From f8e78fbc6fd85f6c14abadf43a0b544ea64ec96a Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 10 Mar 2026 00:24:10 +0100 Subject: [PATCH] =?UTF-8?q?Bugfix:=20Ziele=20und=20Ma=C3=9Fnahmen,=20die?= =?UTF-8?q?=20an=20gel=C3=B6schten=20Oberzielen=20h=C3=A4ngen=20=20werden?= =?UTF-8?q?=20nicht=20mehr=20angezeigt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BeWoPlanerMobil/Controllers/MainController.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/BeWoPlanerMobil/Controllers/MainController.cs b/BeWoPlanerMobil/Controllers/MainController.cs index 7c42446ea..15fe5490c 100644 --- a/BeWoPlanerMobil/Controllers/MainController.cs +++ b/BeWoPlanerMobil/Controllers/MainController.cs @@ -904,8 +904,11 @@ namespace BeWoPlanerMobil.Controllers { continue; } - - goalTreeDic[zielMitEltern.ParentOid.Value].Children.Add(zielMitEltern); + if (goalTreeDic.ContainsKey(zielMitEltern.ParentOid.Value)) + { + goalTreeDic[zielMitEltern.ParentOid.Value].Children.Add(zielMitEltern); + } + } foreach(var ziel in massnahmen) @@ -965,9 +968,9 @@ namespace BeWoPlanerMobil.Controllers { var parentDC = ValueListService.GetValueListEntryByOid(pParentOid); - if(parentDC?.ValueListEntryOid is null) + if(parentDC?.ValueListEntryOid is null || parentDC?.IsActive == false) { - continue; + break; } if(!_ParentGoals.ContainsKey(parentDC.ValueListEntryOid.Value))