Skip to content
Snippets Groups Projects
Commit 018304dd authored by Benjamin Ledel's avatar Benjamin Ledel
Browse files

Update file views.py

parent 758439d3
No related branches found
No related tags found
No related merge requests found
Pipeline #1561885 failed
......@@ -333,7 +333,7 @@ class CreateStatement(APIView):
except Exception as e:
if settings.DEBUG:
print("Could not forward to ", additional_lrs["url"], ":", e)
if (not res or res.status_code != 200) and not settings.CELERY_TASK_ALWAYS_EAGER:
if not res or res.status_code != 200:
retry_forward_statements.delay(x_api_statements, additional_lrs["token_type"], additional_lrs["token"], additional_lrs["url"])
if settings.DEBUG:
print("Could not forward to ", additional_lrs["url"], ":", res.reason if res is not None else "URL could not be reached", "({})".format(res.status_code) if res is not None else "")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment