Oh no I made a crash bug and it somehow got past adding an account on live but not on test
This commit is contained in:
parent
409ad95c05
commit
743d6ec5ca
|
@ -7,7 +7,7 @@ class BankAccount(models.Model):
|
|||
physical=models.CharField(max_length=100)
|
||||
currency=models.CharField(max_length=5)
|
||||
@property
|
||||
def balance(self): return sum(map(Payment.objects.filter(account=self)))
|
||||
def balance(self): return sum(map(lambda x:x.amount,Payment.objects.filter(account=self)))
|
||||
|
||||
def __str__(self):
|
||||
return str(self.name)+', '+str(self.balance)
|
||||
|
|
Loading…
Reference in New Issue
Block a user