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

kobotoolbox / kpi / 26953616674
82%
master: 76%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 04 Jun 2026 01:11PM UTC
Jobs 10
Files 883
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

04 Jun 2026 01:06PM UTC coverage: 81.552% (+0.01%) from 81.54%
26953616674

push

github

web-flow
feat(asset): allow owners to delete empty assets DEV-1988 (#7090)

### đŸ“Ŗ Summary
Allow users to delete assets they have created if there are no
submissions.


### 📖 Description
Extends permission to delete an asset to a user if:
1. They created the asset
2. They have the manage_asset permission
3. The asset has no submissions


### 💭 Notes
Both single delete and bulk delete go through the bulk serializer, so
the change had to be made there in addition to the permissions check for
the single DELETE.
Adds the ability to pass a prefetched list of ObjectPermissions to pass
to `has_perm` to avoid multiple round trips to the DB for each asset.


### 👀 Preview steps

1. â„šī¸ have an account and a project
2. Delete all submissions from the project
4. Add the account to an MMO with a different owner so the project is
transferred
5. From a terminal, DELETE to `api/v2/assets/<project_uid>` as the
account user (not the organization owner)
7. 🔴 [on main] 403
8. đŸŸĸ [on PR] the asset is deleted
9. Create another asset and make sure it has 0 submissions
10. From a terminal, POST to `/api/v2/assets/bulk` with
```
{
"payload": {
     "asset_uids": ["<asset uid>"],
     "action": "delete"
}
}
```
7. 🔴 [on main] 403
8. đŸŸĸ [on PR] the asset is deleted

9016 of 12244 branches covered (73.64%)

11 of 40 new or added lines in 2 files covered. (27.5%)

1 existing line in 1 file now uncovered.

29561 of 36248 relevant lines covered (81.55%)

5.56 hits per line

Uncovered Changes

Lines Coverage ∆ File
24
64.3
-2.15% kpi/serializers/v2/asset.py
5
92.92
-1.23% kpi/mixins/object_permission.py

Coverage Regressions

Lines Coverage ∆ File
1
72.73
-4.55% kpi/urls/__init__.py
Jobs
ID Job ID Ran Files Coverage
1 26953616674.1 04 Jun 2026 01:11PM UTC 879
44.91
2 26953616674.2 04 Jun 2026 01:11PM UTC 879
50.19
3 26953616674.3 04 Jun 2026 01:11PM UTC 879
53.53
4 26953616674.4 04 Jun 2026 01:12PM UTC 881
46.29
5 26953616674.5 04 Jun 2026 01:13PM UTC 881
54.82
6 26953616674.6 04 Jun 2026 01:14PM UTC 879
59.4
7 26953616674.7 04 Jun 2026 01:14PM UTC 881
51.55
8 26953616674.8 04 Jun 2026 01:14PM UTC 881
66.46
9 26953616674.9 04 Jun 2026 01:15PM UTC 881
60.58
10 26953616674.10 04 Jun 2026 01:18PM UTC 883
68.81
Source Files on build 26953616674
  • Tree
  • List 883
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 36e7ea55 on github
  • Prev Build on main (#26946674527)
  • Next Build on main (#26967058193)
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