-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Tectonic Unit paleoContexts relationship to the datamodel #6059
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Add a new or edit an existing PaleoContext which has a related TectonicUnit
- No error should occur
- On the Tectonic Unit form, display the
paleoContexts
relationship as a Subview and ensure that PaleoContexts can be added, removed, and edited
Working now, not sure what happened before but tectonic unit can be rendered as a subview and search has been removed from dependent querycbx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Add a new or edit an existing PaleoContext which has a related TectonicUnit
- No error should occur
- On the Tectonic Unit form, display the
paleoContexts
relationship as a Subview and ensure that PaleoContexts can be added, removed, and edited
Looks good!
Fixes #6042
This PR does not address the true underlying cause: that it's easy to miss such a relationship in the datamodel to begin with!
A more ideal solution to make sure this problem doesn't happen again is to write a backend test to verify the integrity of the datamodel.
Alternatively, we can remove the separate datamodel file entirely, and only use the Django models and fields, adding any necessary attributes to the fields as need (and implementing a way to enforce integrity for those attributes).
While investigating the Issue, I also uncovered another bug which may be relavent for testing: #6058
Checklist
self-explanatory (or properly documented)
Testing instructions
ciscocollections
from Adding Paleo Context to COG's child CO causes FieldDoesNotExistError #6042 (comment)), switch to a Collection in a Geo/Paleo disciplinepaleoContexts
relationship as a Subview and ensure that PaleoContexts can be added, removed, and edited