From 41137ffa4a4d0446685916fe34a834c39fbe09a1 Mon Sep 17 00:00:00 2001
From: Boris Ponsioen <b.g.t.ponsioen@uva.nl>
Date: Mon, 16 Apr 2018 15:36:45 +0200
Subject: [PATCH] Readds error handling in get_crossref_test temporarily

---
 metacore/services.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/metacore/services.py b/metacore/services.py
index bd12be201..4ea922954 100644
--- a/metacore/services.py
+++ b/metacore/services.py
@@ -28,13 +28,13 @@ def get_crossref_test(cursor='*'):
         print("Last cursor: ", last_cursor)
         print("Current cursor: ", cursor)
 
+        params = {'cursor': cursor, 'rows': rows, 'mailto': 'b.g.t.ponsioen@uva.nl'}
+        last_cursor = cursor
         for j in range(0,2):
-            params = {'cursor': cursor, 'rows': rows, 'mailto': 'b.g.t.ponsioen@uva.nl'}
             r = requests.get(url, params=params)
             r_json = r.json()
 
             citables_json = r_json['message']['items']
-            last_cursor = cursor
             cursor = r_json['message']['next-cursor']
             number_of_results = len(r_json['message']['items'])
 
-- 
GitLab