Fix resume of objects with no activity_id

This commit is contained in:
Marco Pesenti Gritti 2007-07-20 21:25:39 +02:00
parent 6e6fd02322
commit 21f8027810

View File

@ -128,9 +128,12 @@ class DSObject(object):
else:
service_name = self.get_activities()[0].service_name
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)
if self.metadata['activity_id']:
handle.activity_id = self.metadata['activity_id']
activityfactory.create(service_name, handle)