fix: Avoid unnecessary syncing defaults (#33108)
When default is `'0.0000'` (string) it gets synced again and again even though it will end up being 0 again.
This commit is contained in:
parent
2a1d3dd474
commit
40b465ee0d
1 changed files with 7 additions and 1 deletions
|
|
@ -332,7 +332,13 @@ class DbColumn:
|
|||
def default_changed_for_decimal(self, current_def):
|
||||
try:
|
||||
if current_def["default"] in ("", None) and self.default in ("", None):
|
||||
# both none, empty
|
||||
return False
|
||||
|
||||
elif (
|
||||
current_def["default"]
|
||||
and float(current_def["default"]) == 0.0
|
||||
and self.default in ("", None, 0.0)
|
||||
):
|
||||
return False
|
||||
|
||||
elif current_def["default"] in ("", None):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue