[billreminder] Handle categories with None



commit 882c6081f9fb4d6a957ce243ec8752b1a3575b46
Author: Og B. Maciel <ogmaciel gnome org>
Date:   Thu Nov 26 15:47:33 2009 -0500

    Handle categories with None

 src/gui/maindialog.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/gui/maindialog.py b/src/gui/maindialog.py
index ce7c395..927423b 100644
--- a/src/gui/maindialog.py
+++ b/src/gui/maindialog.py
@@ -312,7 +312,7 @@ class MainDialog:
         try:
             records = self.actions.get_monthly_totals(start, end)
             # Chart widget takes data in format (('CategoryName', amount),)
-            categories = [cat for cat,total in records]
+            categories = ['None' if not cat else cat for cat,total in records]
             totals = [float(total) for cat,total in records]
             #records = [(c if c else 'None',float(t)) for c,t in records]
         except Exception, e:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]