From a6383683ba0ed96dd35c8641c8a156d92a636e0d Mon Sep 17 00:00:00 2001
From: dnns01 <git@dnns01.de>
Date: Sun, 17 Sep 2023 10:50:17 +0200
Subject: [PATCH] Removed something

---
 haugebot_web/views.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/haugebot_web/views.py b/haugebot_web/views.py
index 43df120..adcf066 100644
--- a/haugebot_web/views.py
+++ b/haugebot_web/views.py
@@ -141,10 +141,9 @@ def wusstest_du_schon_active(request: HttpRequest) -> JsonResponse:
             payload = json.loads(request.body)
             command = get_object_or_404(WusstestDuSchon, pk=payload["id"])
             command.active = payload["active"]
-            field = command.active
             command.save()
 
-            return JsonResponse({"active": field})
+            return JsonResponse({"active": command.active})
         except (json.decoder.JSONDecodeError, KeyError):
             pass
 
@@ -157,10 +156,9 @@ def wusstest_du_schon_prefix(request: HttpRequest) -> JsonResponse:
             payload = json.loads(request.body)
             command = get_object_or_404(WusstestDuSchon, pk=payload["id"])
             command.use_prefix = payload["active"]
-            field = command.use_prefix
             command.save()
 
-            return JsonResponse({"active": field})
+            return JsonResponse({"active": command.use_prefix})
         except (json.decoder.JSONDecodeError, KeyError):
             pass
 
-- 
GitLab