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

Add project relationship to additional models #213

Merged
merged 6 commits into from
Aug 30, 2023
Merged

Conversation

mihow
Copy link
Collaborator

@mihow mihow commented Aug 25, 2023

For many objects, the associated Project was only accessible through multiple joins. But we will be filtering on project in almost every query. This adds a project attribute and filter to all models that need it.

  • Deployment
  • SourceImage
  • Occurrence
  • Taxon

Functions have been added to multiple save() methods so that if a Deployment's project changes, the project of its children will be updated as well.

Taxon has a special project filter that will only return Taxa which have actually been detected within a project.

@netlify
Copy link

netlify bot commented Aug 25, 2023

Deploy Preview for ami-storybook canceled.

Name Link
🔨 Latest commit 215684d
🔍 Latest deploy log https://app.netlify.com/sites/ami-storybook/deploys/64ee92371d088f0007a79691

@netlify
Copy link

netlify bot commented Aug 25, 2023

Deploy Preview for ami-web canceled.

Name Link
🔨 Latest commit 215684d
🔍 Latest deploy log https://app.netlify.com/sites/ami-web/deploys/64ee923713260b0007d86717

@mihow mihow marked this pull request as ready for review August 30, 2023 00:50
@mihow mihow merged commit a97e7ac into main Aug 30, 2023
6 checks passed
@mihow
Copy link
Collaborator Author

mihow commented Aug 30, 2023

Closes #212
Related to #211

@mihow mihow deleted the project-associations branch November 17, 2023 21:35
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.

1 participant