-
Notifications
You must be signed in to change notification settings - Fork 16
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
Make AssessmentValue.study M2M #1093
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.
Looks good! I just had one comment about merging the migrations introduced in this PR.
Also, I noticed a comment that was marked as resolved regarding some of our m2m helper methods. While we normally pass them a field string, we can also pass them expressions, so we may be able to build each type of identifier (ie pmids, hero ids, etc) if we use a subquery. Just food for thought if we plan on implementing it.
hawc/apps/assessment/migrations/0041_assessmentvalue_studies_and_more.py
Outdated
Show resolved
Hide resolved
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.
Looks good. There were larger two changes I had to fix during testing
- The study autocomplete showed ALL studies across all assessments, not just those for one particular assessment.
- The migration failed if a study is None and and it was trying to write a null study in the studies many to many relation
Diffs are here:
Changes
study
foreign key field to be a many-to-many relationship instead. Also modifies the help text forvalue
andpod_value
to make it clearer that entering scientific notation is valid.