Commit 0bfb5e4
fix(admin): harden workflow — 9 fixes for review queue, audit trail, CI
Fix 1: Wire send_buyer_status_email() into review_queue.review_update_status
Fix 2: Enforce requires_transition_note() in review_queue (was missing; admin had it)
Fix 3: Add missing `redirect` to submission.py module-level imports (latent NameError)
Fix 4: Create StatusLog entries for every assign/unassign action (4 locations):
- admin.py assign_to_me bulk action (loop replaces .update())
- admin.py clear_assignee bulk action (loop replaces .update())
- admin_api.py assign_to_me HTMX endpoint
- review_queue.py auto-claim on status update
Fix 5: Append "[SYSTEM] email failed" note to StatusLog on send failure in _bulk_set_status
Fix 6: Replace broken pylint.yml matrix with real CI (Python 3.13, Django test runner)
Fix 7: Add applications/tests/ package with 16 tests covering:
- ReviewQueueTests: queue redirect, empty state, status log, auto-claim,
invalid transition, note enforcement, buyer email, no-email paths
- AdminAPITests: assign + audit log, pending count JSON, doc review save/reject
- TransitionEnforcementTests: map completeness, terminal states, reopen path
Fix 8: Split pending_count into action_needed + waiting_on_buyer (backward-compat)
Fix 9: Add export_csv bulk action to ApplicationAdmin (CSV download for staff)
Also converts applications/tests.py → applications/tests/ package so new tests
can live alongside the existing e2e suite.1 parent b41daa8 commit 0bfb5e4
9 files changed
Lines changed: 445 additions & 53 deletions
File tree
- .github/workflows
- applications
- tests
- views
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
| |||
543 | 546 | | |
544 | 547 | | |
545 | 548 | | |
| 549 | + | |
546 | 550 | | |
547 | 551 | | |
548 | 552 | | |
| |||
1196 | 1200 | | |
1197 | 1201 | | |
1198 | 1202 | | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
1199 | 1213 | | |
1200 | 1214 | | |
1201 | 1215 | | |
| |||
1228 | 1242 | | |
1229 | 1243 | | |
1230 | 1244 | | |
1231 | | - | |
1232 | | - | |
1233 | | - | |
1234 | | - | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
1235 | 1267 | | |
1236 | 1268 | | |
1237 | 1269 | | |
| |||
1241 | 1273 | | |
1242 | 1274 | | |
1243 | 1275 | | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
1244 | 1323 | | |
1245 | | - | |
1246 | | - | |
1247 | | - | |
1248 | | - | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
1249 | 1339 | | |
1250 | 1340 | | |
1251 | 1341 | | |
| |||
Whitespace-only changes.
0 commit comments