Commit 2eeff23
committed
[fix] Skip WHOIS and estimated location for deactivated devices #1325
- add guard in WHOISService to skip processing for deactivated devices
- add guard in EstimatedLocationService to prevent task scheduling
- fix N+1 query by including _is_deactivated in clear_last_ip_command
queryset
- add regression tests ensuring tasks are skipped when device is
deactivated
- ensure deterministic tests by enabling whois on organization
settings
Fixes #13251 parent 8d528e7 commit 2eeff23
3 files changed
Lines changed: 32 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | 24 | | |
26 | | - | |
27 | 25 | | |
28 | 26 | | |
29 | 27 | | |
| |||
349 | 347 | | |
350 | 348 | | |
351 | 349 | | |
352 | | - | |
| 350 | + | |
353 | 351 | | |
354 | 352 | | |
355 | 353 | | |
| |||
1203 | 1201 | | |
1204 | 1202 | | |
1205 | 1203 | | |
1206 | | - | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
1207 | 1211 | | |
1208 | 1212 | | |
1209 | 1213 | | |
| |||
1213 | 1217 | | |
1214 | 1218 | | |
1215 | 1219 | | |
1216 | | - | |
1217 | 1220 | | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
1218 | 1224 | | |
1219 | 1225 | | |
1220 | 1226 | | |
1221 | 1227 | | |
1222 | | - | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| |||
0 commit comments