-
Notifications
You must be signed in to change notification settings - Fork 5
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
Staging issue fixes #2079
Staging issue fixes #2079
Conversation
5eae062
to
70231e1
Compare
70231e1
to
0fc8526
Compare
d471a21
to
5825bc6
Compare
c5e9502
to
4f78423
Compare
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.
LGTM
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.
per/drf_views.py
Outdated
if assessment_queryset.exists(): | ||
for assessent in assessment_queryset.first().area_responses.all(): |
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.
if assessment_queryset.exists(): | |
for assessent in assessment_queryset.first().area_responses.all(): | |
if assessent := assessment_queryset.first(): | |
for area_response in assessent.area_responses.all(): |
Let's use Prefetch for all nested items here, we can use filters as well
https://docs.djangoproject.com/en/3.2/ref/models/querysets/#prefetch-related
>>> vegetarian_pizzas = Pizza.objects.filter(vegetarian=True)
>>> Restaurant.objects.prefetch_related(
... Prefetch("pizzas", queryset=vegetarian_pizzas, to_attr="vegetarian_menu"),
... "vegetarian_menu__toppings",
... )
>>> [menu for menu in restaurant_obj.vegetarian_menu] # No database fetching is done here
8fca044
to
6fe1a51
Compare
Addresses
Emergencies over month
diagram seems to be missing data go-web-app#801Changes
None
per
in document uploadNOTES:
Please run the following command
Checklist
Things that should succeed before merging.
Release
If there is a version update, make sure to tag the repository with the latest version.