Commit e289d7a
[fix] Populate Config.checksum_db field without modifying Config.status #1113
Bug:
Config.update_status_if_checksum_changed() sets the Config.status
to modified if the Config.checksum_db field is empty. In the migration
Config.checksum_db is empty, thus all Config.status is set to modified
to all devices.
Fix:
Use Config.objects.bulk_update() to populate the Config.checksum_db field.
It does not call save(), nor it sends pre_save and post_save signals.
Thus, it avoids any side-effects from the migration.
[skip changelog]
Related to #11131 parent ac6fd83 commit e289d7a
File tree
1 file changed
+15
-2
lines changed- openwisp_controller/config/migrations
1 file changed
+15
-2
lines changedLines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
11 | 15 | | |
12 | 16 | | |
| 17 | + | |
| 18 | + | |
13 | 19 | | |
14 | 20 | | |
15 | 21 | | |
16 | 22 | | |
17 | | - | |
| 23 | + | |
18 | 24 | | |
19 | 25 | | |
20 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
21 | 34 | | |
22 | 35 | | |
23 | 36 | | |
| |||
0 commit comments