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