Surface duplicate importing error in collection
This commit is contained in:
@@ -116,7 +116,13 @@ defmodule MusicLibraryWeb.CollectionLive.Index do
|
|||||||
|> push_navigate(to: ~p"/collection/#{record.id}")}
|
|> push_navigate(to: ~p"/collection/#{record.id}")}
|
||||||
|
|
||||||
{:error, %Ecto.Changeset{} = changeset} ->
|
{:error, %Ecto.Changeset{} = changeset} ->
|
||||||
{:noreply, assign(socket, form: to_form(changeset))}
|
{:noreply,
|
||||||
|
socket
|
||||||
|
|> put_flash(
|
||||||
|
:error,
|
||||||
|
gettext("Error importing record") <> "," <> inspect(changeset.errors)
|
||||||
|
)
|
||||||
|
|> push_patch(to: ~p"/collection")}
|
||||||
|
|
||||||
{:error, reason} ->
|
{:error, reason} ->
|
||||||
{:noreply,
|
{:noreply,
|
||||||
|
|||||||
@@ -81,7 +81,8 @@ msgstr ""
|
|||||||
msgid "Edit"
|
msgid "Edit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/music_library_web/live/collection_live/index.ex:124
|
#: lib/music_library_web/live/collection_live/index.ex:123
|
||||||
|
#: lib/music_library_web/live/collection_live/index.ex:130
|
||||||
#: lib/music_library_web/live/stats_live/index.ex:67
|
#: lib/music_library_web/live/stats_live/index.ex:67
|
||||||
#: lib/music_library_web/live/stats_live/index.ex:73
|
#: lib/music_library_web/live/stats_live/index.ex:73
|
||||||
#: lib/music_library_web/live/wishlist_live/index.ex:120
|
#: lib/music_library_web/live/wishlist_live/index.ex:120
|
||||||
|
|||||||
Reference in New Issue
Block a user