Remove group check in is_checkout

This commit is contained in:
Ludovic Stephan 2017-03-25 09:57:44 -03:00
parent bc0affc038
commit d8f572bb01

View file

@ -569,8 +569,7 @@ class Operation(models.Model):
def is_checkout(self): def is_checkout(self):
return (self.type == Operation.DEPOSIT or return (self.type == Operation.DEPOSIT or
self.type == Operation.WITHDRAW or self.type == Operation.WITHDRAW or
(self.type == Operation.PURCHASE and self.group and (self.type == Operation.PURCHASE and self.group.on_acc.is_cash)
self.group.on_acc.is_cash)
) )
def __str__(self): def __str__(self):