wcs: don't crash on missing cell parameter (#31665)

This commit is contained in:
Frédéric Péters 2019-03-23 17:51:57 +01:00
parent ff686a8df8
commit 90c0cf6582
1 changed files with 1 additions and 1 deletions

View File

@ -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']