Skip to content
Snippets Groups Projects
Commit a660d371 authored by Bastien Abadie's avatar Bastien Abadie
Browse files

Merge branch 'ignore-empty-iiif-metadata' into 'master'

Ignore empty IIIF manifest metadata

See merge request !344
parents 2e6e7c71 243ff01c
No related branches found
No related tags found
1 merge request!344Ignore empty IIIF manifest metadata
......@@ -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