mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 10:11:46 +00:00
Minor fix.
This commit is contained in:
@@ -72,9 +72,11 @@ class Patcher:
|
|||||||
for element in self.file:
|
for element in self.file:
|
||||||
self.file_patched.add(element)
|
self.file_patched.add(element)
|
||||||
|
|
||||||
new_length = [u for u in unit_assignment.Units if u.UnitType == "LENGTHUNIT"][0]
|
new_length = [u for u in unit_assignment.Units if getattr(u, "UnitType", None) == "LENGTHUNIT"][0]
|
||||||
old_length = [
|
old_length = [
|
||||||
u for u in self.file_patched.by_type("IfcProject")[1].UnitsInContext.Units if u.UnitType == "LENGTHUNIT"
|
u
|
||||||
|
for u in self.file_patched.by_type("IfcProject")[1].UnitsInContext.Units
|
||||||
|
if getattr(u, "UnitType", None) == "LENGTHUNIT"
|
||||||
][0]
|
][0]
|
||||||
|
|
||||||
for inverse in self.file_patched.get_inverse(old_length):
|
for inverse in self.file_patched.get_inverse(old_length):
|
||||||
|
|||||||
Reference in New Issue
Block a user