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

kobotoolbox / kpi / 23247771128 / 10
82%
master: 76%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 18 Mar 2026 01:58PM UTC
Files 882
Run time 30s
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: 61.715% (+8.4%) from 53.283%
23247771128.10

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.

4565 of 11432 branches covered (39.93%)

21452 of 34760 relevant lines covered (61.71%)

0.62 hits per line

Source Files on job 23247771128.10
  • Tree
  • List 882
  • Changed 154
  • Source Changed 0
  • Coverage Changed 154
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 23247771128
  • b41ac8f3 on github
  • Prev Job for on release/2.026.07 (#23203227668.1)
  • Next Job for on release/2.026.07 (#23247749127.1)
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