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

kobotoolbox / kpi / 29586939962
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: dev-1635-cleanup-legacy-kobocat-kml-logic
DEFAULT BRANCH: master
Ran 17 Jul 2026 02:16PM UTC
Jobs 10
Files 894
Run time 3min
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

17 Jul 2026 02:11PM UTC coverage: 81.382% (+0.009%) from 81.373%
29586939962

push

github

web-flow
fix(project-views): return asset_count for users list DEV-2438 (#7264)

### đŸ“Ŗ Summary

Fixes a server error when listing the users of a project view.

### 📖 Description

Opening the **Users** tab of a project view failed with a server error
and showed no one. The list now loads correctly again, including each
user's project count.

### 💭 Notes

- `UserListSerializer` is shared by `/api/v2/users/` and
`/api/v2/project-views/{uid}/users/`. A perf change (DEV-1236, #6447)
switched `get_asset_count` to read a `user.assets_count` attribute that
only `UserViewSet` precomputes per page — the project-views endpoint
never sets it, so the serializer raised `AttributeError: 'User' object
has no attribute 'assets_count'` → 500.
- Fix: `get_asset_count` falls back to a direct `user.assets.count()`
when the attribute isn't precomputed. Keeps the optimized path for
`/api/v2/users/`, restores the pre-#6447 behavior for project-views.
- Added a regression test for the previously-uncovered `users` action.

### 👀 Preview steps

1. â„šī¸ be a superuser with a project view configured
(region/organization)
2. `GET /api/v2/project-views/{uid}/users/`
3. 🔴 [on main] the request returns `500` (`AttributeError: 'User' object
has no attribute 'assets_count'`)
4. đŸŸĸ [on PR] the request returns `200` with the user list, each entry
carrying `asset_count`

9300 of 12652 branches covered (73.51%)

0 of 3 new or added lines in 1 file covered. (0.0%)

30297 of 37228 relevant lines covered (81.38%)

5.51 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
75.93
-2.92% kpi/serializers/v2/user.py
Jobs
ID Job ID Ran Files Coverage
1 29586939962.1 17 Jul 2026 02:16PM UTC 890
49.54
2 29586939962.2 17 Jul 2026 02:16PM UTC 890
44.38
3 29586939962.3 17 Jul 2026 02:17PM UTC 890
52.89
4 29586939962.4 17 Jul 2026 02:17PM UTC 892
45.74
5 29586939962.5 17 Jul 2026 02:18PM UTC 892
54.15
6 29586939962.6 17 Jul 2026 02:18PM UTC 892
50.88
7 29586939962.7 17 Jul 2026 02:19PM UTC 892
66.67
8 29586939962.8 17 Jul 2026 02:19PM UTC 890
58.91
9 29586939962.9 17 Jul 2026 02:21PM UTC 892
60.06
10 29586939962.10 17 Jul 2026 02:21PM UTC 894
68.97
Source Files on build 29586939962
  • Tree
  • List 894
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 02c51139 on github
  • Prev Build on release/2.026.27 (#29522872618)
  • Next Build on release/2.026.27 (#29743815627)
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