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

Network manager funnel performance #391

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

hemant10yadav
Copy link
Contributor

@hemant10yadav hemant10yadav commented Sep 16, 2024

@hemant10yadav hemant10yadav changed the title Hy/network manager funnel performance Network manager funnel performance Sep 16, 2024
Base automatically changed from hy/invite-program to hy/managed-opportunity-creation September 18, 2024 06:54
Base automatically changed from hy/managed-opportunity-creation to main September 18, 2024 06:54
@hemant10yadav hemant10yadav self-assigned this Sep 18, 2024
@hemant10yadav hemant10yadav marked this pull request as draft September 30, 2024 03:00
@hemant10yadav hemant10yadav marked this pull request as ready for review September 30, 2024 08:15
Copy link
Collaborator

@calellowitz calellowitz left a 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])
Copy link
Collaborator

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]
Copy link
Collaborator

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"),
Copy link
Collaborator

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?

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.

2 participants