From 86cd278e0cf02e3a87794d161dcc90813e820cbd Mon Sep 17 00:00:00 2001 From: Tom Morrell Date: Mon, 6 May 2024 15:17:26 -0700 Subject: [PATCH] Fix publisher handling --- ames/harvesters/caltechauthors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ames/harvesters/caltechauthors.py b/ames/harvesters/caltechauthors.py index 53025a2..18e6dd8 100644 --- a/ames/harvesters/caltechauthors.py +++ b/ames/harvesters/caltechauthors.py @@ -75,7 +75,7 @@ def get_publisher(token, record, test=False, draft=True): if draft: url = url + "/draft" response = requests.get(url, headers=headers) - return response.json()["metadata"]["publisher"] + return response.json()["metadata"].get("publisher") def get_author_records(token, author_identifier, year=None, test=False):