diff --git a/cli.py b/cli.py index fdb4315..d7c6106 100755 --- a/cli.py +++ b/cli.py @@ -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()