Bugfix: Ziele und Maßnahmen, die an gelöschten Oberzielen hängen werden nicht mehr angezeigt

This commit is contained in:
2026-03-10 00:24:10 +01:00
parent 69d466b45e
commit f8e78fbc6f

View File

@@ -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))