Fix exception raising on 'event list' command when event has no transactions.

master
crudo 2017-03-24 21:08:32 +01:00
parent 819a38e2d3
commit a6e878c6fd
1 changed files with 4 additions and 1 deletions

5
cli.py
View File

@ -23,7 +23,10 @@ def get_total(transaction):
def get_income(event):
return sum(get_total(t) for t in event.transactions)
if event.transactions:
return sum(get_total(t) for t in event.transactions)
else:
return 0
@click.group()