From 2bd2eca26e8d19e4fc0649957050f7a97fa54a4f Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Thu, 29 Dec 2022 22:00:50 +0100 Subject: [PATCH] Fix order of saving transactions Snapshot value was not calculated correctly --- nummi/main/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nummi/main/models.py b/nummi/main/models.py index f3bb598..0891885 100644 --- a/nummi/main/models.py +++ b/nummi/main/models.py @@ -212,8 +212,8 @@ class Transaction(CustomModel): def save(self, *args, **kwargs): self.account = self.snapshot.account - self.snapshot.update_sum() super().save(*args, **kwargs) + self.snapshot.update_sum() def __str__(self): return f"{self.date} – {self.name}"