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

kobotoolbox / kpi / 23247771128
82%
master: 76%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 18 Mar 2026 01:49PM UTC
Jobs 10
Files 884
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

18 Mar 2026 01:44PM UTC coverage: 81.801% (-0.005%) from 81.806%
23247771128

push

github

web-flow
fix(admin): prevent manual username changes for existing users in Django admin DEV-1888 (#6839)

### 📣 Summary
This PR locks down the `username` field in the Django admin panel for
existing users, preventing superusers from manually changing it and
breaking the `_userform_id` mapping in MongoDB.

### 📖 Description
Manually changing a username via the Django admin updates the relational
database but leaves MongoDB documents out of sync. Because the
`_userform_id` key in MongoDB relies on the original username, altering
it breaks submission retrieval and detaches submissions from their
correct projects.

Changes:
- Overrides get_readonly_fields in ExtendedUserAdmin (extend_user.py)
- Keeps username editable when creating a new user (obj=None).
- Dynamically appends username to `readonly_fields` when editing an
existing user record.

7410 of 11511 branches covered (64.37%)

1 of 5 new or added lines in 1 file covered. (20.0%)

162 existing lines in 7 files now uncovered.

28502 of 34843 relevant lines covered (81.8%)

5.81 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
4
46.63
-0.77% hub/admin/extend_user.py

Uncovered Existing Lines

Lines Coverage ∆ File
5
76.47
-4.2% kobo/apps/stripe/utils/subscription_limits.py
5
86.67
0.0% kpi/utils/object_permission.py
8
58.51
-8.51% kobo/apps/stripe/utils/billing_dates.py
10
44.0
-40.0% kobo/apps/stripe/signals.py
24
74.76
-23.3% kpi/utils/usage_calculator.py
47
60.26
1.64% kobo/apps/organizations/views.py
63
70.66
0.05% kpi/serializers/v2/asset.py
Jobs
ID Job ID Ran Files Coverage
1 23247771128.1 18 Mar 2026 01:49PM UTC 880
53.3
2 23247771128.2 18 Mar 2026 01:50PM UTC 880
54.79
3 23247771128.3 18 Mar 2026 01:50PM UTC 882
54.57
4 23247771128.4 18 Mar 2026 01:51PM UTC 882
65.48
5 23247771128.5 18 Mar 2026 01:51PM UTC 882
56.08
6 23247771128.6 18 Mar 2026 01:51PM UTC 880
60.54
7 23247771128.7 18 Mar 2026 01:52PM UTC 880
53.39
8 23247771128.8 18 Mar 2026 01:52PM UTC 882
54.78
9 23247771128.9 18 Mar 2026 01:53PM UTC 884
67.79
10 23247771128.10 18 Mar 2026 01:58PM UTC 882
61.71
Source Files on build 23247771128
  • Tree
  • List 884
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • b41ac8f3 on github
  • Prev Build on release/2.026.07 (#23203227668)
  • Next Build on release/2.026.07 (#23247749127)
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