Skip to content

Commit

Permalink
check for startCanvas because not all manifests will have them
Browse files Browse the repository at this point in the history
  • Loading branch information
rsinghal committed Jan 28, 2021
1 parent feae430 commit 54c590f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tms/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ def get_manifest_data(request, id):
data = models.get_item(id, "manifest", ES_INDEX_IIIF)
manifest = data['manifest']
manifest['@id'] = base_uri + manifest['@id']
manifest["sequences"][0]['startCanvas'] = base_uri + manifest["sequences"][0]['startCanvas']
if 'startCanvas' in manifest["sequences"][0]:
manifest["sequences"][0]['startCanvas'] = base_uri + manifest["sequences"][0]['startCanvas']
manifest['sequences'][0]['@id'] = base_uri + manifest['sequences'][0]['@id']
canvases = manifest['sequences'][0]['canvases']
for canvas in canvases:
Expand Down

0 comments on commit 54c590f

Please sign in to comment.