From 018304ddba04d052031d8c6662a564ee0fcf788d Mon Sep 17 00:00:00 2001
From: Benjamin Ledel <benjamin.ledel@digitallearning.gmbh>
Date: Thu, 19 Dec 2024 07:48:11 +0100
Subject: [PATCH] Update file views.py

---
 src/xapi/views.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/xapi/views.py b/src/xapi/views.py
index 540a0f8..5de3b36 100644
--- a/src/xapi/views.py
+++ b/src/xapi/views.py
@@ -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 "")
-- 
GitLab