[hamster-applet] avoid creating activities without name or start time. don't care about rest
- From: Toms Baugis <tbaugis src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [hamster-applet] avoid creating activities without name or start time. don't care about rest
- Date: Sat, 16 Jan 2010 12:35:58 +0000 (UTC)
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]