Skip to content

Commit 1dfd092

Browse files
committed
OAProc: safeguard link rel check (#2282) (#2283)
* OAProc: safeguard link rel check (#2282) * fix ref
1 parent 1e7577c commit 1dfd092

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pygeoapi/api/processes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -720,11 +720,11 @@ def get_oas_30(cfg: dict, locale: str
720720
'externalDocs': {}
721721
}
722722
for link in p.metadata.get('links', []):
723-
if link['type'] == 'information':
723+
if link.get('rel', '') == 'information':
724724
translated_link = l10n.translate(link, locale)
725725
tag['externalDocs']['description'] = translated_link[
726-
'type']
727-
tag['externalDocs']['url'] = translated_link['url']
726+
'rel']
727+
tag['externalDocs']['url'] = translated_link['href']
728728
break
729729
if len(tag['externalDocs']) == 0:
730730
del tag['externalDocs']

0 commit comments

Comments
 (0)