openalex: Handle missing primary location dict
This commit is contained in:
parent
beb0cfeec9
commit
6f7852eedb
|
@ -141,7 +141,10 @@ class APIClient:
|
||||||
sorted(abstract_forward.items()),
|
sorted(abstract_forward.items()),
|
||||||
))
|
))
|
||||||
|
|
||||||
if work["primary_location"]["source"] is not None:
|
if (
|
||||||
|
work["primary_location"] is not None
|
||||||
|
and work["primary_location"]["source"] is not None
|
||||||
|
):
|
||||||
source = work["primary_location"]["source"]["display_name"]
|
source = work["primary_location"]["source"]["display_name"]
|
||||||
|
|
||||||
results.append({
|
results.append({
|
||||||
|
|
Loading…
Reference in New Issue