Skip to content

Commit

Permalink
fix: redirect canvas links to main iiif manifest
Browse files Browse the repository at this point in the history
(instead of throwing an error)
  • Loading branch information
alycejenni committed Mar 5, 2024
1 parent 9dd2e40 commit cd14153
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ckanext/iiif/builders/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ def match_and_build(self, identifier: str) -> Optional[dict]:
required format
:raise: IIIFBuildError if anything goes wrong after the identifier is matched
"""
regex = re.compile('resource/(?P<resource_id>.+?)/record/(?P<record_id>.+)$')
regex = re.compile(
'resource/(?P<resource_id>.+?)/record/(?P<record_id>[^/]+).*$'
)
match = regex.match(identifier)
if not match:
return None
Expand Down

0 comments on commit cd14153

Please sign in to comment.