-
Notifications
You must be signed in to change notification settings - Fork 1
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
Network manager funnel performance #391
base: main
Are you sure you want to change the base?
Conversation
…rk-manager-funnel-performance
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.
generally looks good. a few questions and one small nit
UserVisit.objects.filter( | ||
opportunity_access=OuterRef("opportunityaccess"), | ||
) | ||
.exclude(status__in=[VisitValidationStatus.over_limit, VisitValidationStatus.trial]) |
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.
can this use the filter you defined above?
) | ||
.exclude(status__in=[VisitValidationStatus.over_limit, VisitValidationStatus.trial]) | ||
.order_by("visit_date") | ||
.values("visit_date")[:1] |
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.
nit: You can use .first()
here instead of the slice
"opportunityaccess__assessment", | ||
filter=Q( | ||
opportunityaccess__assessment__passed=True, | ||
opportunityaccess__assessment__opportunity=F("opportunityaccess__opportunity"), |
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.
is this filter necessary? shouldn't the opportunity access guarantee its the right opportunity already?
https://dimagi.atlassian.net/browse/CCCT-479