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

This commit is contained in:
crudo 2017-03-24 21:08:32 +01:00
parent 819a38e2d3
commit a6e878c6fd

5
cli.py
View File

@ -23,7 +23,10 @@ def get_total(transaction):
def get_income(event): 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() @click.group()