mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-19 22:27: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 ->
|
||||
interactions =
|
||||
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))
|
||||
|> Repo.all()
|
||||
|
||||
|
@ -261,15 +261,6 @@ defmodule Philomena.Galleries do
|
|||
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
|
||||
|> Enum.map(fn change ->
|
||||
id = Keyword.fetch!(change, :id)
|
||||
|
|
Loading…
Reference in a new issue