From c303f216adfd9ffc92ad12771a80a38b2e7855fd Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Fri, 31 May 2024 18:02:49 +0500 Subject: [PATCH] Migrate recipe - do not call .migrate twice for each element --- src/ifcpatch/ifcpatch/recipes/Migrate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ifcpatch/ifcpatch/recipes/Migrate.py b/src/ifcpatch/ifcpatch/recipes/Migrate.py index 5280875ce9..8a4c6768cd 100644 --- a/src/ifcpatch/ifcpatch/recipes/Migrate.py +++ b/src/ifcpatch/ifcpatch/recipes/Migrate.py @@ -47,6 +47,6 @@ class Patcher: self.file_patched = ifcopenshell.file(schema=self.schema) migrator = ifcopenshell.util.schema.Migrator() for element in self.file: - migrator.migrate(element, self.file_patched) + new_element = migrator.migrate(element, self.file_patched) print("Migrating", element) - print("Successfully converted to", migrator.migrate(element, self.file_patched)) + print("Successfully converted to", new_element)