From 5c87e62179c8de1029adb3497f8218e377197328 Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Thu, 10 Sep 2020 12:54:19 -0400 Subject: [PATCH] fix changeset error on commission item creation --- lib/philomena/commissions.ex | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/philomena/commissions.ex b/lib/philomena/commissions.ex index cea6d6f6..4b42840b 100644 --- a/lib/philomena/commissions.ex +++ b/lib/philomena/commissions.ex @@ -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 """