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

kobotoolbox / kpi / 24993281612
82%
master: 76%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 27 Apr 2026 11:54AM UTC
Jobs 10
Files 912
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

27 Apr 2026 11:49AM UTC coverage: 82.127% (+0.008%) from 82.119%
24993281612

push

github

web-flow
fix(mfa): prevent MFA re-enrollment lockouts by centralizing deactivation cleanup DEV-2023 (#6964)

### 📣 Summary
This PR fixes a desynchronization bug where deactivating an MFA wrapper
via the Django Admin UI left orphaned Authenticator records in the
database, breaking future re-enrollment. Cleanup logic has now been
centralized in the model to ensure safe, consistent deletion across both
API and Admin flows.

### 📖 Description
Previously, when a superuser disabled MFA through the Django Admin, the
associated django-allauth Authenticator records were not removed. This
left orphaned records in the database, causing a "Token Invalid" error
when the user attempted to re-enroll.

This PR introduces a robust, centralized deactivate() method on the
MfaMethodsWrapper model, ensuring that all related Authenticator records
are properly cleaned up whenever MFA is disabled, regardless of the
entry point (Admin or API).

7794 of 11991 branches covered (65.0%)

5 of 30 new or added lines in 3 files covered. (16.67%)

24 existing lines in 1 file now uncovered.

29614 of 36059 relevant lines covered (82.13%)

5.78 hits per line

Uncovered Changes

Lines Coverage ∆ File
15
41.49
-5.88% kobo/apps/accounts/mfa/models.py
9
55.56
-25.69% kobo/apps/accounts/mfa/admin.py
1
28.21
-0.37% kobo/apps/accounts/mfa/flows.py

Coverage Regressions

Lines Coverage ∆ File
24
74.76
-23.3% kpi/utils/usage_calculator.py
Jobs
ID Job ID Ran Files Coverage
1 24993281612.1 27 Apr 2026 11:54AM UTC 908
54.22
2 24993281612.2 27 Apr 2026 11:54AM UTC 908
52.69
3 24993281612.3 27 Apr 2026 11:55AM UTC 910
53.91
4 24993281612.4 27 Apr 2026 11:56AM UTC 908
52.93
5 24993281612.5 27 Apr 2026 11:56AM UTC 910
55.47
6 24993281612.6 27 Apr 2026 11:56AM UTC 908
60.22
7 24993281612.7 27 Apr 2026 11:57AM UTC 910
65.99
8 24993281612.8 27 Apr 2026 11:57AM UTC 910
54.27
9 24993281612.9 27 Apr 2026 11:58AM UTC 910
61.35
10 24993281612.10 27 Apr 2026 11:58AM UTC 912
68.22
Source Files on build 24993281612
  • Tree
  • List 912
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 9e3b035d on github
  • Prev Build on release/2.026.12 (#24985384679)
  • Next Build on release/2.026.12 (#25043236721)
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