mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 10:11:46 +00:00
Migrate recipe - do not call .migrate twice for each element
This commit is contained in:
@@ -47,6 +47,6 @@ class Patcher:
|
|||||||
self.file_patched = ifcopenshell.file(schema=self.schema)
|
self.file_patched = ifcopenshell.file(schema=self.schema)
|
||||||
migrator = ifcopenshell.util.schema.Migrator()
|
migrator = ifcopenshell.util.schema.Migrator()
|
||||||
for element in self.file:
|
for element in self.file:
|
||||||
migrator.migrate(element, self.file_patched)
|
new_element = migrator.migrate(element, self.file_patched)
|
||||||
print("Migrating", element)
|
print("Migrating", element)
|
||||||
print("Successfully converted to", migrator.migrate(element, self.file_patched))
|
print("Successfully converted to", new_element)
|
||||||
|
|||||||
Reference in New Issue
Block a user