Skip to content

Commit 0e342bf

Browse files
Assign 'mime_type' variable before reference
1 parent 90f65d3 commit 0e342bf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/jarabe/journal/bundlelauncher.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ def get_bundle(bundle_id=None, object_id=None):
4343

4444
return activities[0]
4545
else:
46+
obj = datastore.get(object_id)
47+
if obj.metadata['mime_type'] is None:
48+
return None
49+
mime_type = str(obj.metadata['mime_type'])
4650
bundle = bundleregistry.get_registry().get_bundle(bundle_id)
4751
if bundle is None:
4852
logging.warning('Activity with the bundle_id %s was not found',

0 commit comments

Comments
 (0)