From da5a4a4a53fb824dad8b95c3460a8858f7065f30 Mon Sep 17 00:00:00 2001 From: Julien Constant Date: Sun, 9 Apr 2023 00:10:35 +0200 Subject: [PATCH] Should fix #609 --- counter/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/counter/views.py b/counter/views.py index 9e6df235..4d5af292 100644 --- a/counter/views.py +++ b/counter/views.py @@ -583,7 +583,7 @@ class CounterClick(CounterTabsMixin, CanViewMixin, DetailView): - , where the string is the code of the product - X, where the integer is the quantity and str the code """ - string = parse_qs(request.body.decode())["code"][0].upper() + string = parse_qs(request.body.decode()).get("code", [""])[0].upper() if string == "FIN": return self.finish(request) elif string == "ANN":