Fix create snapshot bug
This commit is contained in:
parent
9ea0839ba8
commit
bae4fed8d6
1 changed files with 4 additions and 3 deletions
|
@ -146,9 +146,10 @@ class Snapshot(AccountModel):
|
|||
)
|
||||
|
||||
def __str__(self):
|
||||
return "{} – {}".format(
|
||||
_("%(date)s statement") % {"date": self.date}, self.account
|
||||
)
|
||||
desc = _("%(date)s statement") % {"date": self.date}
|
||||
if hasattr(self, "account"):
|
||||
return f"{desc} – {self.account}"
|
||||
return desc
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
if Snapshot.objects.filter(id=self.id).exists():
|
||||
|
|
Loading…
Reference in a new issue