We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b6ddef commit a849676Copy full SHA for a849676
caltechdata_api/cli.py
@@ -159,10 +159,14 @@ def get_funding_entries():
159
160
def validate_funder_identifier(funder_identifier):
161
response = requests.get(f"https://api.ror.org/organizations/{funder_identifier}")
162
+ returnv = False
163
if response.status_code == 200:
- return response.json().get("name")
164
- else:
165
- return False
+ names = response.json().get("names", [])
+ for name in names:
166
+ types = name.get("types", [])
167
+ if "ror_display" in types:
168
+ returnv = name.get("value")
169
+ return returnv
170
171
172
def get_funding_details():
0 commit comments