Remove useless db operation

This commit is contained in:
Edgar P. Burkhart 2022-12-29 21:59:31 +01:00
parent c083fff07e
commit cb253d4305
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227

View file

@ -152,7 +152,6 @@ class Snapshot(AccountModel):
trans.save() trans.save()
self.diff = self.value - self.start_value self.diff = self.value - self.start_value
self.sum = self.transaction_set.aggregate(sum=models.Sum("value")).get("sum", 0)
super().save(*args, **kwargs) super().save(*args, **kwargs)
def update_sum(self): def update_sum(self):