]> piware.de Git - bin.git/commitdiff
workitems: fix crash on empty list
authormartin@piware.de <>
Fri, 20 Nov 2009 04:29:23 +0000 (22:29 -0600)
committermartin@piware.de <>
Fri, 20 Nov 2009 04:29:23 +0000 (22:29 -0600)
workitems.py

index fa40e47764b0800d579b0f252df41171a2e1d27c..68554fe57a19779826f13486cd30be43670655bc 100755 (executable)
@@ -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])