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 6c5e5568ea
commit 8c4540e82c

3
cli.py
View File

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