Skip to content
Snippets Groups Projects
Commit 243ff01c authored by Erwan Rouchet's avatar Erwan Rouchet Committed by Bastien Abadie
Browse files

Ignore empty IIIF manifest metadata

parent 2e6e7c71
No related branches found
No related tags found
No related merge requests found
......@@ -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):
......
......@@ -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",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment