Unverified Commit 0820fa20 authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

fix reporting for unenrichable records


Signed-off-by: Sebastian Schüpbach's avatarSebastian Schüpbach <sebastian.schuepbach@unibas.ch>
parent 6bf86c4f
Pipeline #17934 passed with stages
in 1 minute and 54 seconds
......@@ -281,8 +281,8 @@ class MediametadataToDB:
logging.debug(f'Processing record {record_id}')
access_status = _get_access_status(record, record_id)
if access_status == 'public' or access_status == 'closed':
enrichable = False
for record_resource in record:
enrichable = False
if 'type' in record_resource and \
record_resource['type'] == 'digitalObject' and \
_has_http_locator(record_resource):
......@@ -310,10 +310,10 @@ class MediametadataToDB:
"Could not process thumbnail object")
else:
record_values_for_db.append(enriched_data)
if not enrichable:
reporter.send_message(record_id,
"IGNORE",
"Resource has no digitalObject or thumbnail")
if not enrichable:
reporter.send_message(record_id,
"IGNORE",
"Resource has no digitalObject or thumbnail")
else:
logging.info(f'Ignoring record {record_id} since' +
f' access of digitalObject is {access_status}')
......
Markdown is supported
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