diff --git a/CHANGELOG.md b/CHANGELOG.md index ff5df7c7..3f652d9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# v0.8.6 +- Fix duplicate entries showing up + # v0.8.5 - Add link in readme to github mirror - Fix tables unable to sort on empty dates diff --git a/lib/cannery/activity_log.ex b/lib/cannery/activity_log.ex index d24bbf03..b107925b 100644 --- a/lib/cannery/activity_log.ex +++ b/lib/cannery/activity_log.ex @@ -60,7 +60,8 @@ defmodule Cannery.ActivityLog do sg.search, ^trimmed_search ) - } + }, + distinct: sg.id ) end diff --git a/lib/cannery/ammo.ex b/lib/cannery/ammo.ex index 3760e8c7..2585fcb7 100644 --- a/lib/cannery/ammo.ex +++ b/lib/cannery/ammo.ex @@ -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) diff --git a/lib/cannery/containers.ex b/lib/cannery/containers.ex index 20a66dd6..9b61f515 100644 --- a/lib/cannery/containers.ex +++ b/lib/cannery/containers.ex @@ -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) diff --git a/mix.exs b/mix.exs index 8bc60ede..0dd17610 100644 --- a/mix.exs +++ b/mix.exs @@ -4,7 +4,7 @@ defmodule Cannery.MixProject do def project do [ app: :cannery, - version: "0.8.5", + version: "0.8.6", elixir: "1.14.1", elixirc_paths: elixirc_paths(Mix.env()), compilers: Mix.compilers(), diff --git a/priv/gettext/de/LC_MESSAGES/errors.po b/priv/gettext/de/LC_MESSAGES/errors.po index 848380d5..1fc52143 100644 --- a/priv/gettext/de/LC_MESSAGES/errors.po +++ b/priv/gettext/de/LC_MESSAGES/errors.po @@ -23,7 +23,7 @@ msgstr "" ## Run "mix gettext.extract" to bring this file up to ## date. Leave "msgstr"s empty as changing them here has no ## effect: edit them in PO (.po) files instead. -#: lib/cannery/containers.ex:200 +#: lib/cannery/containers.ex:201 #, elixir-autogen, elixir-format msgid "Container must be empty before deleting" msgstr "Behälter muss vor dem Löschen leer sein" @@ -172,7 +172,7 @@ msgstr "" "Ungültige Nummer an Kopien. Muss zwischen 1 and %{max} liegen. War " "%{multiplier}" -#: lib/cannery/ammo.ex:1015 +#: lib/cannery/ammo.ex:1016 #, elixir-autogen, elixir-format msgid "Invalid multiplier" msgstr "" diff --git a/priv/gettext/en/LC_MESSAGES/errors.po b/priv/gettext/en/LC_MESSAGES/errors.po index 6a8841da..0795b114 100644 --- a/priv/gettext/en/LC_MESSAGES/errors.po +++ b/priv/gettext/en/LC_MESSAGES/errors.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Language: en\n" -#: lib/cannery/containers.ex:200 +#: lib/cannery/containers.ex:201 #, elixir-autogen, elixir-format msgid "Container must be empty before deleting" msgstr "" @@ -155,7 +155,7 @@ msgstr "" msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}" msgstr "" -#: lib/cannery/ammo.ex:1015 +#: lib/cannery/ammo.ex:1016 #, elixir-autogen, elixir-format msgid "Invalid multiplier" msgstr "" diff --git a/priv/gettext/errors.pot b/priv/gettext/errors.pot index 7300c3ca..bc864a07 100644 --- a/priv/gettext/errors.pot +++ b/priv/gettext/errors.pot @@ -10,7 +10,7 @@ msgid "" msgstr "" -#: lib/cannery/containers.ex:200 +#: lib/cannery/containers.ex:201 #, elixir-autogen, elixir-format msgid "Container must be empty before deleting" msgstr "" @@ -154,7 +154,7 @@ msgstr "" msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}" msgstr "" -#: lib/cannery/ammo.ex:1015 +#: lib/cannery/ammo.ex:1016 #, elixir-autogen, elixir-format msgid "Invalid multiplier" msgstr "" diff --git a/priv/gettext/es/LC_MESSAGES/errors.po b/priv/gettext/es/LC_MESSAGES/errors.po index f40e2e4a..27d7579c 100644 --- a/priv/gettext/es/LC_MESSAGES/errors.po +++ b/priv/gettext/es/LC_MESSAGES/errors.po @@ -23,7 +23,7 @@ msgstr "" ## Run "mix gettext.extract" to bring this file up to ## date. Leave "msgstr"s empty as changing them here has no ## effect: edit them in PO (.po) files instead. -#: lib/cannery/containers.ex:200 +#: lib/cannery/containers.ex:201 #, elixir-autogen, elixir-format msgid "Container must be empty before deleting" msgstr "El contenedor debe estar vacío antes de ser borrado" @@ -170,7 +170,7 @@ msgstr "No se ha podido procesar el número de copias" msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}" msgstr "Número inválido de copias, debe ser entre 1 y %{max}. Fue %{multiplier" -#: lib/cannery/ammo.ex:1015 +#: lib/cannery/ammo.ex:1016 #, elixir-autogen, elixir-format msgid "Invalid multiplier" msgstr "Multiplicador inválido" diff --git a/priv/gettext/fr/LC_MESSAGES/errors.po b/priv/gettext/fr/LC_MESSAGES/errors.po index 263cd531..fd4ec5f5 100644 --- a/priv/gettext/fr/LC_MESSAGES/errors.po +++ b/priv/gettext/fr/LC_MESSAGES/errors.po @@ -23,7 +23,7 @@ msgstr "" # # Run "mix gettext.extract" to bring this file up to # # date. Leave "msgstr"s empty as changing them here has no # # effect: edit them in PO (.po) files instead. -#: lib/cannery/containers.ex:200 +#: lib/cannery/containers.ex:201 #, elixir-autogen, elixir-format msgid "Container must be empty before deleting" msgstr "Le conteneur doit être vide pour être supprimé" @@ -171,7 +171,7 @@ msgstr "Impossible d'analyser le nombre de copies" msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}" msgstr "Nombre de copies invalide, doit être 1 et %{max}. Été %{multiplier}" -#: lib/cannery/ammo.ex:1015 +#: lib/cannery/ammo.ex:1016 #, elixir-autogen, elixir-format msgid "Invalid multiplier" msgstr "Multiplicateur invalide" diff --git a/priv/gettext/ga/LC_MESSAGES/errors.po b/priv/gettext/ga/LC_MESSAGES/errors.po index 43149775..6f3fd3e4 100644 --- a/priv/gettext/ga/LC_MESSAGES/errors.po +++ b/priv/gettext/ga/LC_MESSAGES/errors.po @@ -24,7 +24,7 @@ msgstr "" ## Run "mix gettext.extract" to bring this file up to ## date. Leave "msgstr"s empty as changing them here has no ## effect: edit them in PO (.po) files instead. -#: lib/cannery/containers.ex:200 +#: lib/cannery/containers.ex:201 #, elixir-autogen, elixir-format msgid "Container must be empty before deleting" msgstr "Caithfidh an coimeádán a bheidh follamh roimh scriosadh" @@ -170,7 +170,7 @@ msgstr "" msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}" msgstr "" -#: lib/cannery/ammo.ex:1015 +#: lib/cannery/ammo.ex:1016 #, elixir-autogen, elixir-format msgid "Invalid multiplier" msgstr ""