Save activity_id if its not yet in the DS #1276

This commit is contained in:
Tomeu Vizoso 2009-09-19 19:02:04 +02:00
parent f4d91d569e
commit 957c0b4c0f

View File

@ -599,6 +599,9 @@ class Activity(Window, gtk.Container):
if preview is not None: if preview is not None:
self.metadata['preview'] = dbus.ByteArray(preview) self.metadata['preview'] = dbus.ByteArray(preview)
if not self.metadata.get('activity_id', ''):
self.metadata['activity_id'] = self.get_id()
file_path = os.path.join(self.get_activity_root(), 'instance', file_path = os.path.join(self.get_activity_root(), 'instance',
'%i' % time.time()) '%i' % time.time())
try: try: