Closed agy-why closed 1 year ago
it seems that there is no guarranty on the content of field. The default is {}
. Therefore we need to check for the existence of the ucd key.
ucds = field.get('ucd', '')
if "meta.id" in ucds and "meta.ref" in ucds:
...
I obtain a weird error from a user trying to download his job in VOTABLE format. The generation of the VOTable fails because the key 'ucd' does not exitst, although the table was generated by daiquiri.
It starts here: https://github.com/django-daiquiri/daiquiri/blob/master/daiquiri/query/tasks.py#L280 And fails here: https://github.com/django-daiquiri/daiquiri/blob/master/daiquiri/core/generators.py#L96 with KeyError 'ucd' on field['ucd']
It is puzzling why field does not have the key 'ucd' although it comes from the metadata.