fix changeset error on commission item creation

This commit is contained in:
byte[] 2020-09-10 12:54:19 -04:00
parent cc0077d78f
commit 5c87e62179

View file

@ -134,6 +134,13 @@ defmodule Philomena.Commissions do
|> Multi.insert(:item, changeset) |> Multi.insert(:item, changeset)
|> Multi.update_all(:commission, update, []) |> Multi.update_all(:commission, update, [])
|> Repo.transaction() |> Repo.transaction()
|> case do
{:error, :item, changeset, _} ->
{:error, changeset}
result ->
result
end
end end
@doc """ @doc """