Skip to content

Commit

Permalink
fix: use _id field as title if title field not in record
Browse files Browse the repository at this point in the history
  • Loading branch information
alycejenni committed Mar 4, 2024
1 parent 9dd2e40 commit 1c29452
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ckanext/iiif/builders/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def _build_label(resource: dict, record: dict) -> Dict[str, List[str]]:
title_field = '_id'
# make sure the value is a string (this should only be necessary if the _id is
# used)
return wrap_language(str(record[title_field]))
return wrap_language(str(record.get(title_field, record.get('_id'))))

@staticmethod
def _build_rights(resource: dict) -> str:
Expand Down

0 comments on commit 1c29452

Please sign in to comment.