Fix create snapshot bug

This commit is contained in:
Edgar P. Burkhart 2022-12-30 18:22:27 +01:00
parent 9ea0839ba8
commit bae4fed8d6
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227

View file

@ -146,9 +146,10 @@ class Snapshot(AccountModel):
) )
def __str__(self): def __str__(self):
return "{} {}".format( desc = _("%(date)s statement") % {"date": self.date}
_("%(date)s statement") % {"date": self.date}, self.account if hasattr(self, "account"):
) return f"{desc} {self.account}"
return desc
def save(self, *args, **kwargs): def save(self, *args, **kwargs):
if Snapshot.objects.filter(id=self.id).exists(): if Snapshot.objects.filter(id=self.id).exists():