mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 21:47:59 +01:00
fix dupe merger
This commit is contained in:
parent
8f107f4940
commit
7481721d6d
1 changed files with 2 additions and 0 deletions
|
@ -17,6 +17,7 @@ defmodule Philomena.Images do
|
||||||
alias Philomena.Images.Uploader
|
alias Philomena.Images.Uploader
|
||||||
alias Philomena.Images.Tagging
|
alias Philomena.Images.Tagging
|
||||||
alias Philomena.Images.Thumbnailer
|
alias Philomena.Images.Thumbnailer
|
||||||
|
alias Philomena.Images.Source
|
||||||
alias Philomena.Images.ElasticsearchIndex, as: ImageIndex
|
alias Philomena.Images.ElasticsearchIndex, as: ImageIndex
|
||||||
alias Philomena.IndexWorker
|
alias Philomena.IndexWorker
|
||||||
alias Philomena.ImageFeatures.ImageFeature
|
alias Philomena.ImageFeatures.ImageFeature
|
||||||
|
@ -930,6 +931,7 @@ defmodule Philomena.Images do
|
||||||
def migrate_sources(source, target) do
|
def migrate_sources(source, target) do
|
||||||
sources =
|
sources =
|
||||||
(source.sources ++ target.sources)
|
(source.sources ++ target.sources)
|
||||||
|
|> Enum.map(fn s -> %Source{image_id: target.id, source: s.source} end)
|
||||||
|> Enum.uniq()
|
|> Enum.uniq()
|
||||||
|> Enum.take(10)
|
|> Enum.take(10)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue