Amount filter: credit_selector is optional too
This commit is contained in:
parent
afd5bba8a1
commit
ba7d10046f
1 changed files with 7 additions and 4 deletions
|
|
@ -306,7 +306,10 @@ class FrenchTransaction(Transaction):
|
|||
except InvalidOperation:
|
||||
pass
|
||||
|
||||
try:
|
||||
return CleanDecimal(self.credit_selector)(item)
|
||||
except InvalidOperation:
|
||||
return Decimal('0')
|
||||
if self.credit_selector:
|
||||
try:
|
||||
return CleanDecimal(self.credit_selector)(item)
|
||||
except InvalidOperation:
|
||||
pass
|
||||
|
||||
return Decimal('0')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue