Skip to content

Commit 939d373

Browse files
authored
OAProc: safeguard link rel check (#2282) (#2283)
* OAProc: safeguard link rel check (#2282) * fix ref
1 parent 16736b2 commit 939d373

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

pygeoapi/api/processes.py

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

0 commit comments

Comments
 (0)