fix: Solve the problem of version increase caused by push account

This commit is contained in:
jiangweidong
2024-12-04 08:50:36 +08:00
committed by Bryan
parent 3267c8074b
commit d8dfaf0868
3 changed files with 5 additions and 1 deletions

View File

@@ -23,6 +23,9 @@ logger = get_logger(__name__)
@receiver(pre_save, sender=Account)
def on_account_pre_save(sender, instance, **kwargs):
if getattr(instance, 'skip_history_when_saving', False):
return
if instance.version == 0:
instance.version = 1
else: