From 3bbbfdbdab1d7df61792d54e7b6af25d893cf0c8 Mon Sep 17 00:00:00 2001 From: Jorran de Wit <jorrandewit@outlook.com> Date: Tue, 15 May 2018 19:18:32 +0200 Subject: [PATCH] Crossref fix1. --- journals/views.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/journals/views.py b/journals/views.py index bc7ffe522..94f18a5b5 100644 --- a/journals/views.py +++ b/journals/views.py @@ -742,7 +742,11 @@ def harvest_citedby_links(request, doi_label): for link in response_deserialized.iter(prefix + 'forward_link'): citation = {} # Cited in Journal, Book, or whatever you want to be cited in. - link_el = link[0] + if link.find(prefix + 'journal_cite'): + link_el = link.find(prefix + 'journal_cite') + else: + # Not a peer-reviewed citation. + continue # The only required field in Crossref: doi. citation['doi'] = link_el.find(prefix + 'doi').text -- GitLab