fix duplicate entries showing up

This commit is contained in:
2023-03-19 13:28:56 -04:00
parent b32edd581d
commit 213dcca973
11 changed files with 20 additions and 14 deletions

View File

@ -60,7 +60,8 @@ defmodule Cannery.ActivityLog do
sg.search,
^trimmed_search
)
}
},
distinct: sg.id
)
end

View File

@ -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)

View File

@ -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)