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

kobotoolbox / kpi / 23546667414
82%
master: 76%

Build:
Build:
LAST BUILD BRANCH: beccagraber/dev-2180-fix-admin-add-user
DEFAULT BRANCH: master
Ran 25 Mar 2026 02:41PM UTC
Jobs 10
Files 907
Run time 2min
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

25 Mar 2026 02:37PM UTC coverage: 82.216% (+0.09%) from 82.125%
23546667414

push

github

web-flow
fix(api): fixes for asset metadata (#6864)

### đŸ“Ŗ Summary
Fix incorrect counts in asset list metadata.


### 📖 Description
Fixes two bugs:
1. The /metadata endpoint was including all public assets, even those
not owned by the requesting user
2. The `metadata` field in the asset list (included when `?metadata=on`
is provided) was always returning an empty country list


### 💭 Notes
There are other in the AssetViewSet besides `list` (in particular the
`/metadata` endpoint) for which we don't want to load all public assets,
which are used in the `detail` views for permission checks.


### 👀 Preview steps

1. â„šī¸ have at least two accounts, UserA and UserB
3. Create a project as UserA with a country, sector, and some languages
4. Create a project as UserB with a different country, sector, and
languages
5. Make UserB's project publicly viewable
6. Login as UserA
7. Navigate to `/api/v2/assets/metadata`
8. 🔴 [on main] the `countries` field is empty, and the `sectors` and
`languages` fields include those of UserB's asset
9. đŸŸĸ [on PR] the `countries` field contains the correct country for
UserA's project and UserB's asset information is not present in the
other fields

7760 of 11939 branches covered (65.0%)

2 of 14 new or added lines in 2 files covered. (14.29%)

23 existing lines in 4 files now uncovered.

29537 of 35926 relevant lines covered (82.22%)

5.8 hits per line

Uncovered Changes

Lines Coverage ∆ File
12
69.75
-0.79% kpi/views/v2/asset.py

Coverage Regressions

Lines Coverage ∆ File
19
38.24
-55.88% kpi/parsers.py
2
80.0
-20.0% kpi/mixins/mfa.py
1
50.7
-0.47% kpi/renderers.py
1
69.75
-0.79% kpi/views/v2/asset.py
Jobs
ID Job ID Ran Files Coverage
1 23546667414.1 25 Mar 2026 02:41PM UTC 903
52.87
2 23546667414.2 25 Mar 2026 02:42PM UTC 903
54.41
3 23546667414.3 25 Mar 2026 02:43PM UTC 905
54.1
4 23546667414.4 25 Mar 2026 02:43PM UTC 903
53.09
5 23546667414.5 25 Mar 2026 02:43PM UTC 905
55.66
6 23546667414.6 25 Mar 2026 02:43PM UTC 903
60.45
7 23546667414.7 25 Mar 2026 02:45PM UTC 905
54.44
8 23546667414.8 25 Mar 2026 02:47PM UTC 907
68.25
9 23546667414.9 25 Mar 2026 03:15PM UTC 905
66.02
10 23546667414.10 25 Mar 2026 03:15PM UTC 905
61.59
Source Files on build 23546667414
  • Tree
  • List 907
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • bf72e03d on github
  • Prev Build on release/2.026.12 (#23544873927)
  • Next Build on release/2.026.12 (#23580177676)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc