[hamster-applet] avoid creating activities without name or start time. don't care about rest



commit 2fa0a76b5e21df4ce8175ac25493951f044fb3ca
Author: Toms Bauģis <toms baugis gmail com>
Date:   Sat Jan 16 11:55:24 2010 +0000

    avoid creating activities without name or start time. don't care about rest

 hamster/db.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/hamster/db.py b/hamster/db.py
index cbe5d08..fe79a56 100644
--- a/hamster/db.py
+++ b/hamster/db.py
@@ -490,6 +490,8 @@ class Storage(storage.Storage):
         if end_time:
             end_time = end_time.replace(microsecond = 0)
 
+        if not start_time or not activity.activity_name:  # sanity check
+            return
 
         # now check if maybe there is also a category
         category_id = None



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