diff --git a/arkindex/dataimport/iiif.py b/arkindex/dataimport/iiif.py index b7645015da55e156751b9e0fcf82e34d11c72342..7732cfdb6baa4fe0d07ee2e355d41e752416398a 100644 --- a/arkindex/dataimport/iiif.py +++ b/arkindex/dataimport/iiif.py @@ -241,6 +241,9 @@ class ManifestParser(IIIFParser): if not all(prop in item for prop in ('label', 'value')): logger.warning('Metadata does not have the required label and value properties') continue + if not item['value']: + logger.warning('Metadata with label {} has an empty value - ignoring'.format(item['value'])) + continue data.append(item) def grouper(item): diff --git a/arkindex/dataimport/tests/manifest_samples/base.json b/arkindex/dataimport/tests/manifest_samples/base.json index c78944e4506646adf620e946860174dbae4e99c8..fe89e41c37d0cf4d8cee6c3163e496aad25c96a6 100644 --- a/arkindex/dataimport/tests/manifest_samples/base.json +++ b/arkindex/dataimport/tests/manifest_samples/base.json @@ -30,6 +30,10 @@ { "label": "Label 1", "value": "Value 4" + }, + { + "label": "Ignore me", + "value": "" } ], "license": "http://creativecommons.org/licenses/by-nc/3.0/deed.fr",