resource.assign_resource: fix typo in duplicate guard #8203

The guard that avoids re-assigning the same object to the same resource
tested is_a("IfclRelAssignsToResource") (stray "l"), so it never matched.
A repeat assignment therefore fell through and appended the related object
to RelatedObjects a second time. Corrected to "IfcRelAssignsToResource".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
(cherry picked from commit 21ae78fbc2)
This commit is contained in:
Petru Conduraru
2026-07-09 13:24:42 +03:00
committed by Dion Moult
parent b3dc0b4478
commit 17146d3572
2 changed files with 46 additions and 1 deletions
@@ -81,7 +81,7 @@ def assign_resource(
"""
if related_object.HasAssignments:
for assignment in related_object.HasAssignments:
if assignment.is_a("IfclRelAssignsToResource") and assignment.RelatingResource == relating_resource:
if assignment.is_a("IfcRelAssignsToResource") and assignment.RelatingResource == relating_resource:
return assignment
resource_of = None