From b718bd19bd1346299266f75225b69d79e21692f1 Mon Sep 17 00:00:00 2001 From: Bruno Postle Date: Mon, 6 May 2024 09:05:56 +0100 Subject: [PATCH] fix TypeError File "/usr/lib64/python3.12/site-packages/ifcopenshell/api/project/assign_declaration.py", line 126, in execute related_definitions = set(has_context.RelatedDefinitions) - objects_with_contexts ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ TypeError: unsupported operand type(s) for -: 'set' and 'list' --- .../ifcopenshell/api/project/assign_declaration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ifcopenshell-python/ifcopenshell/api/project/assign_declaration.py b/src/ifcopenshell-python/ifcopenshell/api/project/assign_declaration.py index 776a26b8f5..e1be64ba7f 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/project/assign_declaration.py +++ b/src/ifcopenshell-python/ifcopenshell/api/project/assign_declaration.py @@ -119,9 +119,9 @@ def assign_declaration( return None for has_context in previous_declares_rels: - related_definitions = set(has_context.RelatedDefinitions) - objects_with_contexts + related_definitions = set(has_context.RelatedDefinitions) - set(objects_with_contexts) if related_definitions: - has_context.RelatedDefinitions = related_definitions + has_context.RelatedDefinitions = list(related_definitions) ifcopenshell.api.run("owner.update_owner_history", file, **{"element": has_context}) else: history = has_context.OwnerHistory