Fix #6201. Regression in creating drawings due to typing in 67bac441ad

This commit is contained in:
Dion Moult
2025-02-23 12:02:50 +11:00
parent 8c16f394c1
commit 23158b1b7e
+2 -2
View File
@@ -1202,8 +1202,8 @@ class Drawing(bonsai.core.tool.Drawing):
def get_default_drawing_resource_path(cls, resource: str) -> Union[str, None]:
project = tool.Ifc.get().by_type("IfcProject")[0]
props = tool.Drawing.get_document_props()
resource_path = (
ifcopenshell.util.element.get_pset(project, "BBIM_Documentation", f"{resource}Path") or props.resource_path
resource_path = ifcopenshell.util.element.get_pset(project, "BBIM_Documentation", f"{resource}Path") or getattr(
props, f"{resource.lower()}_path"
)
if resource_path:
return resource_path.replace("\\", "/")