MergeDuplicateTypes - fix error occuring if ifcopenshell.api is not imported

error was:
File "\site-packages\ifcpatch\__init__.py", line 78, in execute
    patcher.patch()
  File "\site-packages\ifcpatch\recipes\MergeDuplicateTypes.py", line 73, in patch
    self.assign_type(element, original_type)
  File "\site-packages\ifcpatch\recipes\MergeDuplicateTypes.py", line 114, in assign_type
    ifcopenshell.api.run("owner.update_owner_history", self.file, **{"element": types[0]})
    ^^^^^^^^^^^^^^^^
AttributeError: module 'ifcopenshell' has no attribute 'api'
This commit is contained in:
Andrej730
2024-02-07 11:09:49 +05:00
parent 3dd94889fa
commit 4418c1327d
@@ -17,6 +17,7 @@
# along with IfcPatch. If not, see <http://www.gnu.org/licenses/>.
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.util.element