From 66bd4f53cbd4b304bfde3a9d678d6e0f7430fafa Mon Sep 17 00:00:00 2001 From: Eike Kettner Date: Sat, 5 Dec 2020 22:44:19 +0100 Subject: [PATCH] Fix person-org relation info --- modules/webapp/src/main/elm/Comp/ItemDetail/Model.elm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/webapp/src/main/elm/Comp/ItemDetail/Model.elm b/modules/webapp/src/main/elm/Comp/ItemDetail/Model.elm index 6345bbb3..5736758d 100644 --- a/modules/webapp/src/main/elm/Comp/ItemDetail/Model.elm +++ b/modules/webapp/src/main/elm/Comp/ItemDetail/Model.elm @@ -335,10 +335,13 @@ personMatchesOrg model = Comp.Dropdown.getSelected model.corrOrgModel |> List.head - persOrg = + pers = Comp.Dropdown.getSelected model.corrPersonModel |> List.head + + persOrg = + pers |> Maybe.andThen (\idref -> Dict.get idref.id model.allPersons) |> Maybe.andThen .organization in - org == Nothing || org == persOrg + org == Nothing || pers == Nothing || org == persOrg