Fix order of saving transactions

Snapshot value was not calculated correctly
This commit is contained in:
Edgar P. Burkhart 2022-12-29 22:00:50 +01:00
parent cb253d4305
commit 2bd2eca26e
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227

View file

@ -212,8 +212,8 @@ class Transaction(CustomModel):
def save(self, *args, **kwargs): def save(self, *args, **kwargs):
self.account = self.snapshot.account self.account = self.snapshot.account
self.snapshot.update_sum()
super().save(*args, **kwargs) super().save(*args, **kwargs)
self.snapshot.update_sum()
def __str__(self): def __str__(self):
return f"{self.date} {self.name}" return f"{self.date} {self.name}"