From 90c0cf65826bda1d5cfe097fbdd2591aa7940945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sat, 23 Mar 2019 17:51:57 +0100 Subject: [PATCH] wcs: don't crash on missing cell parameter (#31665) --- combo/apps/wcs/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/combo/apps/wcs/views.py b/combo/apps/wcs/views.py index 963d89a6..9045f90e 100644 --- a/combo/apps/wcs/views.py +++ b/combo/apps/wcs/views.py @@ -57,7 +57,7 @@ class TrackingCodeView(View): def post(self, request, *args, **kwargs): try: cell = TrackingCodeInputCell.objects.get(id=request.POST['cell']) - except (ValueError, TrackingCodeInputCell.DoesNotExist): + except (KeyError, ValueError, TrackingCodeInputCell.DoesNotExist): return HttpResponseBadRequest('Invalid cell id') code = request.POST['code']