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

replace count() when used for existence checking #9702

Closed
aarongundel opened this issue Jun 29, 2023 · 0 comments · Fixed by #9703
Closed

replace count() when used for existence checking #9702

aarongundel opened this issue Jun 29, 2023 · 0 comments · Fixed by #9703

Comments

@aarongundel
Copy link
Contributor

There are several instances in the code base where count() is being used to check for the existence of a record in a dataset. This is an antipattern and should be purged. https://dev.to/codereviewdoctor/why-queryset-exists-is-more-efficient-than-queryset-count-2f3h

@chiatt chiatt added this to pipeline Jun 29, 2023
@aarongundel aarongundel linked a pull request Jun 29, 2023 that will close this issue
@chiatt chiatt closed this as completed Jul 4, 2023
@github-project-automation github-project-automation bot moved this to ✅ Done in pipeline Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants