Fix leaving a group
There's still an issue because the call is made twice, but at least it works Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -341,6 +341,10 @@ defmodule Mobilizon.GraphQL.Resolvers.Group do
|
||||
{:group, nil} ->
|
||||
{:error, dgettext("errors", "Group not found")}
|
||||
|
||||
# Actions.Leave.leave can also return nil if the member isn't found. Probably something to fix.
|
||||
nil ->
|
||||
{:error, dgettext("errors", "Member not found")}
|
||||
|
||||
{:error, :is_not_only_admin} ->
|
||||
{:error,
|
||||
dgettext("errors", "You can't leave this group because you are the only administrator")}
|
||||
|
||||
Reference in New Issue
Block a user