Skip to content
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

Merged
merged 15 commits into from
Sep 19, 2024
Merged

Make AssessmentValue.study M2M #1093

merged 15 commits into from
Sep 19, 2024

Conversation

munnsmunns
Copy link
Collaborator

Changes study foreign key field to be a many-to-many relationship instead. Also modifies the help text for value and pod_value to make it clearer that entering scientific notation is valid.

@munnsmunns munnsmunns marked this pull request as ready for review September 5, 2024 19:28
Copy link
Collaborator

@rabstejnek rabstejnek left a 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.

Copy link
Owner

@shapiromatron shapiromatron left a 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

  1. The study autocomplete showed ALL studies across all assessments, not just those for one particular assessment.
  2. 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:

  • 8b23427 reduce queries on detail view
  • 72bbe60 fix autocomplete; it previously didn't filter to only show studies in assessment
  • ed6d346 don't build a helper method for this one
  • 4acac5b rename migrations; don't add studies when study is None

@shapiromatron shapiromatron merged commit 8ea2640 into main Sep 19, 2024
6 checks passed
@shapiromatron shapiromatron deleted the assessment-values-study branch September 19, 2024 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants