[billreminder] Filter by category name to check if already exists.
- From: Og B. Maciel <ogmaciel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [billreminder] Filter by category name to check if already exists.
- Date: Sat, 18 Dec 2010 19:49:19 +0000 (UTC)
commit db96f7b7c878edda8c06d2b83dc22f2932db15a2
Author: Og B. Maciel <ogmaciel gnome org>
Date: Sat Dec 18 14:42:29 2010 -0500
Filter by category name to check if already exists.
src/lib/dal.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/lib/dal.py b/src/lib/dal.py
index 027e9e2..a0cb5e0 100644
--- a/src/lib/dal.py
+++ b/src/lib/dal.py
@@ -68,7 +68,7 @@ class DAL(object):
elif isinstance(dbobject, Category):
try:
- category = session.query(Category).filter_by(id=dbobject.id).one()
+ category = session.query(Category).filter_by(name=dbobject.name).one()
if category:
category.name = dbobject.name
category.color = dbobject.color
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]