Skip to content
This repository was archived by the owner on Sep 28, 2022. It is now read-only.

Should CountOf use Count(..., distinct=True) by default? Or allow it to be specified? #27

Open
pmg103 opened this issue Nov 7, 2019 · 0 comments

Comments

@pmg103
Copy link
Contributor

pmg103 commented Nov 7, 2019

Its not clear to me but if you don't specify distinct=True to django.db.models.Count() sometimes you get dupes -- ie the wrong count.

I feel like this is non-obvious and the CountOf() plugin should just always use distinct=True. When would you ever want dupes included in your count? 🤔

@pmg103 pmg103 changed the title Should CountOf use Count(..., distinct=True) by default? Or allow it to be specified? Should CountOf use Count(..., distinct=True) by default? Or allow it to be specified? -- FIXED: NEEDS TESTS Nov 14, 2019
@pmg103 pmg103 changed the title Should CountOf use Count(..., distinct=True) by default? Or allow it to be specified? -- FIXED: NEEDS TESTS Should CountOf use Count(..., distinct=True) by default? Or allow it to be specified? Jan 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant