Fix error when deleting members
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
e0d40014a1
commit
96c5b956e5
3 changed files with 32 additions and 3 deletions
|
|
@ -50,7 +50,8 @@ defmodule MvWeb.MemberLive.Index do
|
|||
member = Ash.get!(Mv.Membership.Member, id)
|
||||
Ash.destroy!(member)
|
||||
|
||||
{:noreply, stream_delete(socket, :members, member)}
|
||||
updated_members = Enum.reject(socket.assigns.members, &(&1.id == id))
|
||||
{:noreply, assign(socket, :members, updated_members)}
|
||||
end
|
||||
|
||||
# Selects one member in the list of members
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue