Title: Typo in resource.assign_resource duplicate guard causes duplicate RelatedObjects · Issue #8203 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: Typo in resource.assign_resource duplicate guard causes duplicate RelatedObjects · Issue #8203 · IfcOpenShell/IfcOpenShell
X Title: Typo in resource.assign_resource duplicate guard causes duplicate RelatedObjects · Issue #8203 · IfcOpenShell/IfcOpenShell
Description: Bug Description In src/ifcopenshell-python/ifcopenshell/api/resource/assign_resource.py, the duplicate-assignment guard appears to contain a typo: if assignment.is_a("IfclRelAssignsToResource") and assignment.RelatingResource == relating...
Open Graph Description: Bug Description In src/ifcopenshell-python/ifcopenshell/api/resource/assign_resource.py, the duplicate-assignment guard appears to contain a typo: if assignment.is_a("IfclRelAssignsToResource") and...
X Description: Bug Description In src/ifcopenshell-python/ifcopenshell/api/resource/assign_resource.py, the duplicate-assignment guard appears to contain a typo: if assignment.is_a("IfclRelAssignsToResource&...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/8203
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Typo in resource.assign_resource duplicate guard causes duplicate RelatedObjects","articleBody":"### Bug Description\n\nIn `src/ifcopenshell-python/ifcopenshell/api/resource/assign_resource.py`, the duplicate-assignment guard appears to contain a typo:\n\n```python\nif assignment.is_a(\"IfclRelAssignsToResource\") and assignment.RelatingResource == relating_resource:\n return assignment\n```\n\nI believe `\"IfclRelAssignsToResource\"` should be `\"IfcRelAssignsToResource\"`.\n\nThis affects behaviour when assigning the same related object to the same resource more than once. The function does not create a second `IfcRelAssignsToResource`, but it appends the same object twice to `RelatedObjects`.\n\nMinimal observed result:\n\nNumber of IfcRelAssignsToResource: 1\nSame relationship returned: True\nRelated object ids: [8, 8]\nOccurrences of test proxy: 2\n\nExpected behaviour:\n\nNumber of IfcRelAssignsToResource: 1\nSame relationship returned: True\nOccurrences of test proxy: 1\n\nSuggested fix:\n\n```diff\n- if assignment.is_a(\"IfclRelAssignsToResource\") and assignment.RelatingResource == relating_resource:\n+ if assignment.is_a(\"IfcRelAssignsToResource\") and assignment.RelatingResource == relating_resource:\n```\n\nTested locally in Bonsai / IfcOpenShell installed under Blender 4.5:\n\n../.config/blender/4.5/extensions/.local/lib/python3.11/site-packages/ifcopenshell/api/resource/assign_resource.py\n\n\n### Attachments\n\n_No response_\n\n### Debug and Error Output\n\n```true\n\n```","author":{"url":"https://github.com/john-rogers","@type":"Person","name":"john-rogers"},"datePublished":"2026-06-25T06:41:46Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/8203"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9143c310-4b3a-ea54-ba6b-3e0ca09b11a4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D788:A2A16:39859F:50BE6C:6B0479DE |
| html-safe-nonce | 5801aa9d76eacd75e03a7f18455b2e642560e076ba12451b5283ebae063dba1a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENzg4OkEyQTE2OjM5ODU5Rjo1MEJFNkM6NkIwNDc5REUiLCJ2aXNpdG9yX2lkIjoiMjA5MzE5MzE0NTc1NTEzODUyNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 056fba03555c34be39bce20d65860e961281bfcba668449090cefa03f343db5f |
| hovercard-subject-tag | issue:4741357649 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/IfcOpenShell/IfcOpenShell/8203/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e3f8a0558b31bc08edf0945e17d90157bdef1380c245668f1dd24d89f9e71c40/IfcOpenShell/IfcOpenShell/issues/8203 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e3f8a0558b31bc08edf0945e17d90157bdef1380c245668f1dd24d89f9e71c40/IfcOpenShell/IfcOpenShell/issues/8203 |
| og:image:alt | Bug Description In src/ifcopenshell-python/ifcopenshell/api/resource/assign_resource.py, the duplicate-assignment guard appears to contain a typo: if assignment.is_a("IfclRelAssignsToResource") and... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | john-rogers |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9c099f1b85def81ca352464c276510dfef32deaf3c305404e65b8d270284a58b |
| turbo-cache-control | no-preview |
| go-import | github.com/IfcOpenShell/IfcOpenShell git https://github.com/IfcOpenShell/IfcOpenShell.git |
| octolytics-dimension-user_id | 13692563 |
| octolytics-dimension-user_login | IfcOpenShell |
| octolytics-dimension-repository_id | 40473201 |
| octolytics-dimension-repository_nwo | IfcOpenShell/IfcOpenShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 40473201 |
| octolytics-dimension-repository_network_root_nwo | IfcOpenShell/IfcOpenShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | cf73f57448d52b3a7b619195e182b33d3b3454ca |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width