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)
end
{:ok, %Actor{}} ->
{:error, :group_not_found}
{:error, _err} ->
{:error, :group_not_found}
end
@ -52,6 +55,9 @@ defmodule Mobilizon.GraphQL.Resolvers.Group do
%Actor{} = actor = restrict_fields_for_non_member_request(actor)
{:ok, actor}
{:ok, %Actor{}} ->
{:error, :group_not_found}
{:error, _err} ->
{:error, :group_not_found}
end