From 620008ee0d5a2351961cbeddd9da9ece25dad44e Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 5 Oct 2022 18:17:11 +0200 Subject: [PATCH] Fix group location edition Signed-off-by: Thomas Citharel --- js/src/views/Group/GroupSettings.vue | 1 + lib/graphql/resolvers/group.ex | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/js/src/views/Group/GroupSettings.vue b/js/src/views/Group/GroupSettings.vue index 7c4a4ef8..4d03f630 100644 --- a/js/src/views/Group/GroupSettings.vue +++ b/js/src/views/Group/GroupSettings.vue @@ -318,6 +318,7 @@ const buildVariables = computed(() => { // @ts-ignore delete physicalAddress.__typename; } + delete physicalAddress?.pictureInfo; delete variables.avatar; delete variables.banner; diff --git a/lib/graphql/resolvers/group.ex b/lib/graphql/resolvers/group.ex index c9111b8a..3eb3a1e5 100644 --- a/lib/graphql/resolvers/group.ex +++ b/lib/graphql/resolvers/group.ex @@ -237,6 +237,10 @@ defmodule Mobilizon.GraphQL.Resolvers.Group do end end else + Logger.info( + "Profile #{updater_actor.id} tried to update group #{group_id}, but they are not admin" + ) + {:error, dgettext("errors", "Profile is not administrator for the group")} end end