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):
|
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():
|
||||||
|
|
Loading…
Reference in a new issue