-
Notifications
You must be signed in to change notification settings - Fork 8
Fix the list of online processing services per project #705
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
Fix the list of online processing services per project #705
Conversation
✅ Deploy Preview for antenna-preview ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
285f8ae addresses this bug, but just to make sure I understood correctly: When a user adds pipelines by clicking the "Register Pipelines" button, it automatically adds those pipelines to that project. But if the pipeline is removed from the project (i.e. through Django admin) the user should not be able to see this pipeline as "registered" or in the ProcessingServiceDetails for this project? Not sure how in a real-life use case without the admin this would occur I also updated the ProcessingServiceDetails so that only pipelines added to the project are visible |
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.
Great work! There is a chance we can make the serializers & views for Pipelines and ProcessingServices more slim by querying less data. But they are fairly small tables used for configuration. If we are working with views & serializers for large tables like Captures, Detections, Occurrences or Taxa then we should profile the queries and limit the data being fetched & passed to the serializer. I'm just noting that here for the future!
ami/ml/views.py
Outdated
# If pipelines are filtered by project, also filter processing services by project | ||
if project: | ||
query_set = query_set.filter(projects=project) | ||
query_set = query_set.filter(projects=project).prefetch_related( |
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.
Nice work finding the custom filter for the Prefetch related query
ami/ml/views.py
Outdated
|
||
if project: | ||
query_set = query_set.filter(projects=project) | ||
query_set = query_set.filter(projects=project).prefetch_related( |
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.
I don't think the processing service view needs to filter the related pipelines by project, but! it will once you add the enabled flag in #738 so I am okay to leave this here
…-list-of-online-processing-services-per-project
Summary
Fix bugs associated with filtering processing services by project.
List of Changes
Related Issues
Closes #700