mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-09 13:52:23 +00:00
Fix regression where you couldn't upgrade schema of IFCs with invalid headers
This commit is contained in:
@@ -663,7 +663,10 @@ class file:
|
|||||||
def assign_header_from(self, other: ifcopenshell.file) -> None:
|
def assign_header_from(self, other: ifcopenshell.file) -> None:
|
||||||
for k, vs in HEADER_FIELDS.items():
|
for k, vs in HEADER_FIELDS.items():
|
||||||
for v in vs:
|
for v in vs:
|
||||||
setattr(getattr(self.header, k), v, getattr(getattr(other.header, k), v))
|
try:
|
||||||
|
setattr(getattr(self.header, k), v, getattr(getattr(other.header, k), v))
|
||||||
|
except:
|
||||||
|
pass # Header is invalid
|
||||||
|
|
||||||
def write(self, path: "os.PathLike | str", format: Optional[str] = None, zipped: bool = False) -> None:
|
def write(self, path: "os.PathLike | str", format: Optional[str] = None, zipped: bool = False) -> None:
|
||||||
"""Write ifc model to file.
|
"""Write ifc model to file.
|
||||||
|
|||||||
Reference in New Issue
Block a user