Merge branch 'fixes' into 'master'

Handle errors from comment changeset as well when creating discussions

See merge request framasoft/mobilizon!902
This commit is contained in:
Thomas Citharel 2021-04-21 08:44:16 +00:00
commit fc94651577

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} ->