fix(datamodel): add missing attachment relationships#8182
fix(datamodel): add missing attachment relationships#8182grantfitzsimmons wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds two missing reverse relationship definitions to the ChangesAttachment reverse relationships
Suggested reviewers
🚥 Pre-merge checks | ✅ 5 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
bhumikaguptaa
left a comment
There was a problem hiding this comment.
- Perform a batch edit on an attachment table and verify that you can save and commit the changes (see #8181)
I tried running a query on the Attachments table and ran into an "AttributeError" on the Absolute Age and Relative Age fields. It only happened with Attachment as a base table, and not when Collection Object was the base table.
Crash Report: Specify 7 Crash Report - 2026-06-11T15_46_07.572Z.txt
Query: New Query.json
Issue Branch:
Screen.Recording.2026-06-11.at.10.41.54.AM.1.mov
Link to DB: https://ojsmnh20260326-issue-8181.test.specifysystems.org/specify/query/334/
|
@CodeRabbit full review |
✅ Action performedFull review finished. |
| Index(name='AttchmentGuidIDX', column_names=['GUID']) | ||
| ], | ||
| relationships=[ | ||
| Relationship(name='absoluteageattachments', type='one-to-many',required=False, relatedModelName='AbsoluteAgeAttachment', otherSideName='attachment'), |
| ], | ||
| relationships=[ | ||
| Relationship(name='absoluteageattachments', type='one-to-many',required=False, relatedModelName='AbsoluteAgeAttachment', otherSideName='attachment'), | ||
| Relationship(name='relativeageattachments', type='one-to-many',required=False, relatedModelName='RelativeAgeAttachment', otherSideName='attachment'), |
Fixes #8181
There were missing attachment data model relationships for some of the new tables. This fixes that.
Testing instructions
datamodel.pyfor new*Attachmentmodels #8181)Summary by CodeRabbit