From: martin@piware.de <> Date: Fri, 20 Nov 2009 04:29:23 +0000 (-0600) Subject: workitems: fix crash on empty list X-Git-Url: https://piware.de/gitweb/?a=commitdiff_plain;h=258d38b9464e9e7a2d9225df4c2bce0879b88485;p=bin.git workitems: fix crash on empty list --- diff --git a/workitems.py b/workitems.py index fa40e47..68554fe 100755 --- a/workitems.py +++ b/workitems.py @@ -315,6 +315,8 @@ def csv(db, from_date, to_date): data = workitems_over_time(db) dates = sorted(data.keys()) + if not dates: + return f = _fromstr(from_date or dates[0]) t = _fromstr(to_date or dates[-1])