Fix an issue when showing public page of suspended group

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2021-09-30 09:26:29 +02:00
parent 5ef50766b1
commit 35b83950d4
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773

View File

@ -41,6 +41,9 @@ defmodule Mobilizon.GraphQL.Resolvers.Group do
find_group(parent, args, nil) find_group(parent, args, nil)
end end
{:ok, %Actor{}} ->
{:error, :group_not_found}
{:error, _err} -> {:error, _err} ->
{:error, :group_not_found} {:error, :group_not_found}
end end
@ -52,6 +55,9 @@ defmodule Mobilizon.GraphQL.Resolvers.Group do
%Actor{} = actor = restrict_fields_for_non_member_request(actor) %Actor{} = actor = restrict_fields_for_non_member_request(actor)
{:ok, actor} {:ok, actor}
{:ok, %Actor{}} ->
{:error, :group_not_found}
{:error, _err} -> {:error, _err} ->
{:error, :group_not_found} {:error, :group_not_found}
end end