[billreminder/fresh] Handle graphic of bills with no category.
- From: Og B. Maciel <ogmaciel src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [billreminder/fresh] Handle graphic of bills with no category.
- Date: Tue, 26 Jan 2010 03:15:53 +0000 (UTC)
commit 10834d649a734869810f534b63ed2b2db2b6dba8
Author: Og B. Maciel <ogmaciel gnome org>
Date: Mon Jan 25 22:14:29 2010 -0500
Handle graphic of bills with no category.
src/gui/new.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/gui/new.py b/src/gui/new.py
index 5ae4a7b..2d4103f 100755
--- a/src/gui/new.py
+++ b/src/gui/new.py
@@ -140,10 +140,10 @@ class MainWindow:
# totals by category
- bills = sorted(bills, key=lambda bill: bill.category.name)
+ bills = sorted(bills, key=lambda bill: bill.category.name if bill.category else _("None"))
category_keys = []
category_amount = []
- for category, totals in itertools.groupby(bills, lambda bill: bill.category):
+ for category, totals in itertools.groupby(bills, lambda bill: bill.category if bill.category else entities.Category()):
total_amount = sum([float(total.amount) for total in totals])
category_keys.append(category.name)
category_amount.append(total_amount)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]