We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f366718 commit 4ee8b91Copy full SHA for 4ee8b91
institutions-api/util/ror_utils.py
@@ -7,5 +7,5 @@
7
def validate_ror_id(ror_id: Optional[str]):
8
""" Check whether an ROR ID is valid by performing a HEAD request to ror.org """
9
# TODO we might want to rate-limit this in some way
10
- if ror_id and requests.head(ror_id).status_code != 200:
+ if ror_id and requests.head(ror_id, allow_redirects=True).status_code != 200:
11
raise HTTPException(400, f"Invalid ROR ID: institution does not exist. See {ROR_ID_PREFIX}.")
0 commit comments