Handle errors from comment changeset as well when creating discussions

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-04-21 09:09:34 +02:00
parent b371a9fe01
commit eb2050a997

View File

@@ -105,7 +105,7 @@ defmodule Mobilizon.GraphQL.Resolvers.Discussion do
}) do
{:ok, discussion}
else
{:error, :discussion, err, _} ->
{:error, type, err, _} when type in [:discussion, :comment] ->
{:error, err}
{:member, false} ->