Don't crash when entering the detailed view if the

activity which created the entry is no more installed.
This commit is contained in:
Marco Pesenti Gritti 2007-09-18 23:34:04 +02:00
parent 2ec098f401
commit 3ccd79e3ca

View File

@ -108,10 +108,10 @@ class DSObject(object):
if self.metadata['activity']:
activity_info = activity.get_registry().get_activity(self.metadata['activity'])
activities.append(activity_info)
if activity_info:
activities.append(activity_info)
mime_type = self.metadata['mime_type']
print mime_type
if mime_type:
activities_info = activity.get_registry().get_activities_for_type(mime_type)
for activity_info in activities_info: