8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-23 07:23:46 +00:00

Fix: Deposit creation form when no deposit items exist

This commit is contained in:
Jean-Romain Garnier 2021-08-06 16:40:22 +02:00
parent 46c8cbb182
commit dfc58a281e

View file

@ -61,8 +61,8 @@ class Deposit(RevMixin, AclMixin, models.Model):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
super(Deposit, self).__init__(*args, **kwargs) super(Deposit, self).__init__(*args, **kwargs)
self.__original_item = self.item self.__original_item = getattr(self, "item", None)
self.__original_deposit_amount = self.deposit_amount self.__original_deposit_amount = getattr(self, "deposit_amount", None)
def __str__(self): def __str__(self):
if self.returned: if self.returned: