[hamster-applet] run fixtures in transaction so we don't end up somewhere in the middle
- From: Toms Baugis <tbaugis src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [hamster-applet] run fixtures in transaction so we don't end up somewhere in the middle
- Date: Sun, 27 Dec 2009 14:22:03 +0000 (UTC)
commit e595faf391329c246eb4514808b1327558f6c9fd
Author: Toms Bauģis <toms baugis gmail com>
Date: Sun Dec 27 14:19:20 2009 +0000
run fixtures in transaction so we don't end up somewhere in the middle
hamster/db.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/hamster/db.py b/hamster/db.py
index 0df1454..d34664d 100644
--- a/hamster/db.py
+++ b/hamster/db.py
@@ -871,6 +871,8 @@ class Storage(storage.Storage):
runtime.register_modification()
def run_fixtures(self):
+ self.start_transaction()
+
# defaults
work_category = {"name": _("Work"),
"entries": [_("Reading news"),
@@ -1084,3 +1086,5 @@ class Storage(storage.Storage):
for entry in nonwork_category["entries"]:
self.__add_activity(entry, nonwork_cat_id)
+
+ self.end_transaction()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]