Commit 05ad77a
committed
[fix]: Prevent FallbackMixin from generating spurious migrations
The deconstruct() method was serializing the fallback kwarg into Django migration files. This caused new migrations to be generated whenever the fallback default value changed in settings, even though no actual database schema change had occurred.
The fix removes fallback from deconstruct() so Django no longer tracks it as part of the field migration state. fallback is also made optional in __init__ (defaulting to None) so existing migrations that omit the kwarg remain valid.
Fixes: #12311 parent cc2e830 commit 05ad77a
File tree
2 files changed
+7
-2
lines changed- openwisp_utils
- tests/test_project/tests
2 files changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | 58 | | |
60 | 59 | | |
61 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
0 commit comments