mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 13:47:58 +01:00
fix changeset error on commission item creation
This commit is contained in:
parent
cc0077d78f
commit
5c87e62179
1 changed files with 7 additions and 0 deletions
|
@ -134,6 +134,13 @@ defmodule Philomena.Commissions do
|
|||
|> Multi.insert(:item, changeset)
|
||||
|> Multi.update_all(:commission, update, [])
|
||||
|> Repo.transaction()
|
||||
|> case do
|
||||
{:error, :item, changeset, _} ->
|
||||
{:error, changeset}
|
||||
|
||||
result ->
|
||||
result
|
||||
end
|
||||
end
|
||||
|
||||
@doc """
|
||||
|
|
Loading…
Reference in a new issue