BIM: fix site error when creating project with default structure

Fixes #24543.
This commit is contained in:
Roy-043
2025-10-15 15:36:35 +02:00
committed by Yorik van Havre
parent 0334c145d0
commit fa67c65da9

View File

@@ -1202,7 +1202,13 @@ class _ViewProviderSite:
It also handles new objects, where their value is 0.
"""
pl = vobj.PropertiesList
try:
pl = vobj.PropertiesList
except ReferenceError:
# vobj no longer exists
# see https://github.com/FreeCAD/FreeCAD/issues/24543
return
if "SunDateMonth" in pl:
saved_month = vobj.SunDateMonth if vobj.SunDateMonth != 0 else 6
vobj.SunDateMonth = (saved_month, 1, 12, 1)