From 7abf4511353140744093b22921c95bbb97552d96 Mon Sep 17 00:00:00 2001 From: Harris Tzovanakis Date: Thu, 16 Nov 2023 16:17:34 +0100 Subject: [PATCH] refextract: fix journal extraction request --- inspirehep/modules/workflows/tasks/refextract.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/inspirehep/modules/workflows/tasks/refextract.py b/inspirehep/modules/workflows/tasks/refextract.py index 1dbf0685da..d0bb7e5820 100644 --- a/inspirehep/modules/workflows/tasks/refextract.py +++ b/inspirehep/modules/workflows/tasks/refextract.py @@ -92,12 +92,12 @@ def extract_journal_info(obj, eng): refextract_request_headers = { "content-type": "application/json", } + response = requests.post( + "{}/extract_journal_info".format(current_app.config["REFEXTRACT_SERVICE_URL"]), + headers=refextract_request_headers, + data=json.dumps({"publication_infos": publication_infos, "journal_kb_data": kbs_journal_dict}) + ) try: - response = requests.post( - "{}/extract_journal_info".format(current_app.config["REFEXTRACT_SERVICE_URL"]), - headers=refextract_request_headers, - data=json.dumps({"publication_infos": publication_infos, "journal_kb_data": kbs_journal_dict}) - ) response.raise_for_status() except RequestException: LOGGER.info("Couldn't extract publication info from url!")