forked from shibao/cannery
fix duplicate entries showing up
This commit is contained in:
@ -60,7 +60,8 @@ defmodule Cannery.ActivityLog do
|
||||
sg.search,
|
||||
^trimmed_search
|
||||
)
|
||||
}
|
||||
},
|
||||
distinct: sg.id
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -715,6 +715,7 @@ defmodule Cannery.Ammo do
|
||||
on: c.user_id == t.user_id,
|
||||
as: :t,
|
||||
where: ag.user_id == ^user_id,
|
||||
distinct: ag.id,
|
||||
preload: ^@ammo_group_preloads
|
||||
)
|
||||
|> list_ammo_groups_include_empty(include_empty)
|
||||
|
@ -32,6 +32,7 @@ defmodule Cannery.Containers do
|
||||
as: :t,
|
||||
where: c.user_id == ^user_id,
|
||||
order_by: c.name,
|
||||
distinct: c.id,
|
||||
preload: ^@container_preloads
|
||||
)
|
||||
|> list_containers_search(search)
|
||||
|
Reference in New Issue
Block a user