[hamster-applet] take tags parsed from activity name into account (fixes bug 608632)



commit fcb544e6f473d2e778baf3533196015958ba5049
Author: Toms Bauģis <toms baugis gmail com>
Date:   Wed Feb 10 08:29:47 2010 +0000

    take tags parsed from activity name into account (fixes bug 608632)

 src/hamster/db.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/hamster/db.py b/src/hamster/db.py
index cadb100..50eabbd 100644
--- a/src/hamster/db.py
+++ b/src/hamster/db.py
@@ -460,13 +460,15 @@ class Storage(storage.Storage):
 
         activity = stuff.parse_activity_input(activity_name)
 
-        tags = [tag.strip() for tag in tags.split(",") if tag.strip()]  # split by comma
-
         # explicitly stated takes precedence
         activity.description = description or activity.description
 
+        tags = [tag.strip() for tag in tags.split(",") if tag.strip()]  # split by comma
+        tags = tags or activity.tags # explicitly stated tags take priority
+
         tags = self.get_tag_ids(tags) #this will create any missing tags too
 
+
         if category_name:
             activity.category_name = category_name
         if description:



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