Unverified Commit 3d966299 authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

fix proto issue

parent 682978f3
......@@ -147,7 +147,10 @@ def _get_values_from_digital_object(msg, access_status):
duration = msg['duration']
return_values['duration'] = duration
if 'isDistributedOn' in msg:
if msg['isDistributedOn'] == 'file' and uri.startswith('http'):
# //@formatter:off
if (msg['isDistributedOn'] == 'audio' or msg['isDistributedOn'] == 'image' or
msg['isDistributedOn'] == 'video') and uri.startswith('http'):
# // @formatter:on
if access_status == 'public':
return_values['proto'] = 'redirect'
......@@ -174,7 +177,7 @@ def _get_access_status(graph, record_id):
f'`{resource["name"]}`. This makes the media resource unavailable.')
logging.info(f'Digital object of record {record_id} has no related access information!'
+ 'Media resource is therefore unavailable')
+ ' Media resource is therefore unavailable')
return 'unavailable'
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment