Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/datastore
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2007-07-20 19:40:41 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2007-07-20 19:40:41 (GMT)
commit8ae99aaa87a282406d1e6393aa697d87bdbba8e1 (patch)
treebd1fd9d7e6a8f7b7489b8437896ef8686a30c580 /sugar/datastore
parent21f80278102ee2e441bab8e78b5560c2cd1602e0 (diff)
Fix resuming objects with no activity associated for real.
Diffstat (limited to 'sugar/datastore')
-rw-r--r--sugar/datastore/datastore.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/sugar/datastore/datastore.py b/sugar/datastore/datastore.py
index 23ca963..83351ed 100644
--- a/sugar/datastore/datastore.py
+++ b/sugar/datastore/datastore.py
@@ -129,13 +129,14 @@ class DSObject(object):
service_name = self.get_activities()[0].service_name
activity_id = self.metadata['activity_id']
+ object_id = self.object_id
+
if activity_id:
- handle = ActivityHandle(object_id=self.object_id,
+ handle = ActivityHandle(object_id=object_id,
activity_id=activity_id)
+ activityfactory.create(service_name, handle)
else:
- handle = ActivityHandle(object_id=self.object_id)
-
- activityfactory.create(service_name, handle)
+ activityfactory.create_with_object_id(service_name, object_id)
def destroy(self):
logging.debug('DSObject.destroy() file_path: %r.' % self._file_path)