-
Notifications
You must be signed in to change notification settings - Fork 76
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
APIv2 : Add filter by ratings on outdoor courses and sites #2768
Conversation
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
Codecov Report
@@ Coverage Diff @@
## master #2768 +/- ##
=======================================
Coverage 97.27% 97.27%
=======================================
Files 287 287
Lines 19884 19916 +32
=======================================
+ Hits 19342 19374 +32
Misses 542 542
Continue to review full report at Codecov.
|
# Exclude if ratings in hierarchy don't match any wanted ratings | ||
found_ratings = site.super_ratings_id | ||
if found_ratings.isdisjoint(wanted_ratings): | ||
queryset = queryset.exclude(id=site.pk) |
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.
Je sais que ce n'est pas idéal d'itérer sur le queryset, mais vu la complexité pour récupérer les pratiques et les cotations des sites enfants, je n'ai pas d'autre idées
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.
Ok, pour le moment on valide comme ça. Si ca pose des problèmes de perf on prendra le temps de réfléchir à une meilleure manière de faire alors.
Met juste un commentaire en TODO dans le code qu'on puisse savoir que c'est optimisable.
# Exclude if ratings in hierarchy don't match any wanted ratings | ||
found_ratings = site.super_ratings_id | ||
if found_ratings.isdisjoint(wanted_ratings): | ||
queryset = queryset.exclude(id=site.pk) |
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.
Ok, pour le moment on valide comme ça. Si ca pose des problèmes de perf on prendra le temps de réfléchir à une meilleure manière de faire alors.
Met juste un commentaire en TODO dans le code qu'on puisse savoir que c'est optimisable.
No description provided.