mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-20 06:37:59 +01:00
fix gallery ordering bug...
This commit is contained in:
parent
2dc36ee36e
commit
7ace92c651
1 changed files with 1 additions and 10 deletions
|
@ -224,7 +224,7 @@ defmodule Philomena.Galleries do
|
||||||
spawn(fn ->
|
spawn(fn ->
|
||||||
interactions =
|
interactions =
|
||||||
Interaction
|
Interaction
|
||||||
|> where([gi], gi.image_id in ^image_ids)
|
|> where([gi], gi.image_id in ^image_ids and gi.gallery_id == ^gallery.id)
|
||||||
|> order_by(^position_order(gallery))
|
|> order_by(^position_order(gallery))
|
||||||
|> Repo.all()
|
|> Repo.all()
|
||||||
|
|
||||||
|
@ -261,15 +261,6 @@ defmodule Philomena.Galleries do
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
IO.inspect([
|
|
||||||
image_ids: image_ids,
|
|
||||||
interactions: interactions,
|
|
||||||
interaction_positions: interaction_positions,
|
|
||||||
images_present: images_present,
|
|
||||||
requested: requested,
|
|
||||||
changes: changes
|
|
||||||
], limit: :infinity)
|
|
||||||
|
|
||||||
changes
|
changes
|
||||||
|> Enum.map(fn change ->
|
|> Enum.map(fn change ->
|
||||||
id = Keyword.fetch!(change, :id)
|
id = Keyword.fetch!(change, :id)
|
||||||
|
|
Loading…
Reference in a new issue