Update Climate_site/python_scripts/related_scientist.py
Browse files
Climate_site/python_scripts/related_scientist.py
CHANGED
|
@@ -254,9 +254,9 @@ def author_id_from_name(name):
|
|
| 254 |
dic_names[author_id]["last_known_institution"] = None
|
| 255 |
dic_names[author_id]["country_code"] = None
|
| 256 |
|
| 257 |
-
if data[k]["
|
| 258 |
-
dic_names[author_id]["last_known_institution"] = data[k]["
|
| 259 |
-
dic_names[author_id]["country_code"] = data[k]["
|
| 260 |
|
| 261 |
dic_names[author_id]["orcid"] = data[k]["orcid"]
|
| 262 |
|
|
|
|
| 254 |
dic_names[author_id]["last_known_institution"] = None
|
| 255 |
dic_names[author_id]["country_code"] = None
|
| 256 |
|
| 257 |
+
if data[k]["last_known_institutions"] != None and len(data[k]["last_known_institutions"]) > 0:
|
| 258 |
+
dic_names[author_id]["last_known_institution"] = data[k]["last_known_institutions"][0]["display_name"]
|
| 259 |
+
dic_names[author_id]["country_code"] = data[k]["last_known_institutions"][0]["country_code"]
|
| 260 |
|
| 261 |
dic_names[author_id]["orcid"] = data[k]["orcid"]
|
| 262 |
|