zf

zenflows testing
git clone https://s.sonu.ch/~srfsh/zf.git
Log | Files | Refs | Submodules | README | LICENSE

commit b8cfb52f95badf7fcc1eb5333200f898dcf7840a
parent e39158ff881d5805abf259810bebfe5d909c9446
Author: srfsh <dev@srf.sh>
Date:   Fri, 11 Nov 2022 16:54:09 +0300

Zenflows.VF.EconomicEvent.Domain: fix incorrect reference

Diffstat:
Msrc/zenflows/vf/economic_event/domain.ex | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/zenflows/vf/economic_event/domain.ex b/src/zenflows/vf/economic_event/domain.ex @@ -311,7 +311,8 @@ defp handle_insert(key, %{action_id: "cite"} = evt, _) do ) |> repo.one!() res = Map.put(res, :container?, - where(EconomicResource, contained_in_id: ^res.id) |> repo.exists?()) + where(EconomicResource, contained_in_id: ^evt.resource_inventoried_as_id) + |> repo.exists?()) cond do evt.resource_quantity_has_unit_id != res.accounting_quantity_has_unit_id ->