From 8ae99aaa87a282406d1e6393aa697d87bdbba8e1 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Fri, 20 Jul 2007 19:40:41 +0000 Subject: Fix resuming objects with no activity associated for real. --- (limited to 'sugar/datastore') 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) -- cgit v0.9.1