[hamster-applet] the description check was failing and so if trying to start a new activity that is same as the previ



commit 86a87da1ed3a4c6526767abf61e78eed219699c3
Author: Toms Bauģis <toms baugis gmail com>
Date:   Thu Aug 19 12:31:47 2010 +0100

    the description check was failing and so if trying to start a new activity that is same as the previous ongoing one, it would add a new record instead of doing nothing

 src/hamster/db.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/hamster/db.py b/src/hamster/db.py
index 843f793..81311b3 100644
--- a/src/hamster/db.py
+++ b/src/hamster/db.py
@@ -573,7 +573,7 @@ class Storage(storage.Storage):
                 # check if maybe that is the same one, in that case no need to restart
                 if previous["activity_id"] == activity_id \
                    and previous["tags"] == sorted([tag["name"] for tag in tags]) \
-                   and previous["description"] == (description or ""):
+                   and (previous["description"] or "") == (description or ""):
                     return previous["id"]
 
                 # otherwise, if no description is added



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