Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/datastore/datastore.py
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2007-07-20 19:25:39 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2007-07-20 19:25:39 (GMT)
commit21f80278102ee2e441bab8e78b5560c2cd1602e0 (patch)
tree1f1434fbb48162ccbecab781afb8bae92ddafe94 /sugar/datastore/datastore.py
parent6e6fd02322e8e3554cfc241fadb3b74d3a38f34d (diff)
Fix resume of objects with no activity_id
Diffstat (limited to 'sugar/datastore/datastore.py')
-rw-r--r--sugar/datastore/datastore.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/sugar/datastore/datastore.py b/sugar/datastore/datastore.py
index 9fca07a..23ca963 100644
--- a/sugar/datastore/datastore.py
+++ b/sugar/datastore/datastore.py
@@ -128,9 +128,12 @@ class DSObject(object):
else:
service_name = self.get_activities()[0].service_name
- handle = ActivityHandle(object_id=self.object_id)
- if self.metadata['activity_id']:
- handle.activity_id = self.metadata['activity_id']
+ activity_id = self.metadata['activity_id']
+ if activity_id:
+ handle = ActivityHandle(object_id=self.object_id,
+ activity_id=activity_id)
+ else:
+ handle = ActivityHandle(object_id=self.object_id)
activityfactory.create(service_name, handle)