Some records do not have files, and there is a traceback for various commands, e.g.
getting some metadata value:
$ cernopendata-client get-metadata --recid 550 --output-value title
...
File ".../cernopendata_client/searcher.py", line 157, in get_record_as_json
if record_json["metadata"]["files"]:
KeyError: 'files'
getting list of files:
$ cernopendata-client get-file-locations --recid 550
...
File ".../cernopendata_client/searcher.py", line 157, in get_record_as_json
if record_json["metadata"]["files"]:
KeyError: 'files'
We should:
amend the code so that no traceback is outputted, rather empty list of files;
write a test case to make sure this situation is handled correctly.
Some records do not have files, and there is a traceback for various commands, e.g.
We should: