[hamster-applet/gnome-2-30] add_fact returns the id, not the whole fact. fixes bug 626662
- From: Toms Baugis <tbaugis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hamster-applet/gnome-2-30] add_fact returns the id, not the whole fact. fixes bug 626662
- Date: Wed, 11 Aug 2010 23:03:05 +0000 (UTC)
commit 8d93337b5f96179b51bb0d50a6e8090b61114f15
Author: Toms Bauģis <toms baugis gmail com>
Date: Thu Aug 12 00:02:52 2010 +0100
add_fact returns the id, not the whole fact. fixes bug 626662
src/hamster/db.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/hamster/db.py b/src/hamster/db.py
index e629d0e..2609199 100644
--- a/src/hamster/db.py
+++ b/src/hamster/db.py
@@ -425,7 +425,7 @@ class Storage(storage.Storage):
SET end_time = ?
WHERE id = ?""", (start_time, fact["id"]))
fact_name = fact["name"]
- new_fact = self.__add_fact(fact["name"],
+ new_fact_id = self.__add_fact(fact["name"],
"", # will create tags in the next step
end_time,
fact["end_time"],
@@ -435,7 +435,7 @@ class Storage(storage.Storage):
SELECT ?, tag_id
FROM fact_tags
WHERE fact_id = ?"""
- self.execute(tag_update, (new_fact["id"], fact["id"])) #clone tags
+ self.execute(tag_update, (new_fact_id, fact["id"])) #clone tags
# overlap start
elif start_time < fact["start_time"] < end_time:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]