• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tortoise / tortoise-orm / 34444158173
85%
master: 94%

Build:
Build:
LAST BUILD BRANCH: fix/psycopg-pool-connection-check
DEFAULT BRANCH: master
Ran 10 Sep 2026 06:26AM UTC
Jobs 1
Files 134
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

10 Sep 2026 06:11AM UTC coverage: 84.475% (+0.003%) from 84.472%
34444158173

push

github

web-flow
fix(queryset): make distinct().count() ignore join-duplicated rows (#2255)

* fix(queryset): make distinct().count() ignore join-duplicated rows

QuerySet.count() always emitted COUNT(*), which counts every row the
query produces. When the queryset is distinct() and the filter spans a
m2m (or any other row-multiplying join), the returned objects are
de-duplicated by the SELECT DISTINCT but the count was not, so count()
reported more rows than the queryset actually yields.

CountQuery now receives the _distinct flag and counts distinct primary
keys instead. Grouped queries keep the existing windowed COUNT(*).

Closes #2178

* Address review feedback from @waketzheng: move changelog entry to 1.1.9 and reference #2255

* Fix lint issue and improve type hints

---------

Co-authored-by: Sanjay Santhanam <Sanjays2402@users.noreply.github.com>
Co-authored-by: Waket Zheng <waketzheng@gmail.com>

3193 of 4240 branches covered (75.31%)

Branch coverage included in aggregate %.

20 of 22 new or added lines in 1 file covered. (90.91%)

11607 of 13280 relevant lines covered (87.4%)

0.87 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
95.39
0.01% tortoise/queryset.py
Jobs
ID Job ID Ran Files Coverage
1 34444158173.1 10 Sep 2026 06:26AM UTC 134
84.47
GitHub Action Run
Source Files on build 34444158173
  • Tree
  • List 134
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 151a32f0 on github
  • Prev Build on develop (#33453480034)
  • Next Build on develop (#34510472437)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc