From cccab9e751734d5e5548b0e2d8348adfc427859c Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Sat, 17 Jul 2021 18:38:04 +1000 Subject: [PATCH] Minor fix. See #1567. --- src/ifcopenshell-python/ifcopenshell/file.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ifcopenshell-python/ifcopenshell/file.py b/src/ifcopenshell-python/ifcopenshell/file.py index 5f9fbc7a3d..e4935a611d 100644 --- a/src/ifcopenshell-python/ifcopenshell/file.py +++ b/src/ifcopenshell-python/ifcopenshell/file.py @@ -290,9 +290,6 @@ class file(object): if attrs: self.transaction = transaction - if self.transaction: - self.transaction.store_create(e) - # Once the values are populated add the instance # to the file. self.wrapped_data.add(e.wrapped_data, eid) @@ -302,6 +299,9 @@ class file(object): # the owner. e.wrapped_data.this.disown() + if self.transaction: + self.transaction.store_create(e) + return e def __getattr__(self, attr):