Handle duplicate usernames correctly

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2021-03-24 11:38:31 +01:00
parent 98a219c7a9
commit 48f52ba4fd
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773

View file

@ -124,6 +124,9 @@ defmodule Mobilizon.GraphQL.Resolvers.Person do
{:ok, %Actor{} = new_person} <- Actors.new_person(args) do {:ok, %Actor{} = new_person} <- Actors.new_person(args) do
{:ok, new_person} {:ok, new_person}
else else
{:error, err} ->
{:error, err}
{:picture, {:error, :file_too_large}} -> {:picture, {:error, :file_too_large}} ->
{:error, dgettext("errors", "The provided picture is too heavy")} {:error, dgettext("errors", "The provided picture is too heavy")}
end end