Skip to content

Commit

Permalink
Assign 'mime_type' variable before reference
Browse files Browse the repository at this point in the history
  • Loading branch information
Saumya-Mishra9129 committed May 26, 2020
1 parent 5b06b60 commit 64cc0e1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/jarabe/journal/bundlelauncher.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ def get_bundle(bundle_id=None, object_id=None):

return activities[0]
else:
obj = datastore.get(object_id)
if obj.metadata['mime_type'] is None:
return None
mime_type = str(obj.metadata['mime_type'])
bundle = bundleregistry.get_registry().get_bundle(bundle_id)
if bundle is None:
logging.warning('Activity with the bundle_id %s was not found',
Expand Down

0 comments on commit 64cc0e1

Please sign in to comment.