Projet

Général

Profil

0001-wcs-don-t-crash-on-missing-cell-parameter-31665.patch

Frédéric Péters, 23 mars 2019 17:52

Télécharger (937 octets)

Voir les différences:

Subject: [PATCH] wcs: don't crash on missing cell parameter (#31665)

 combo/apps/wcs/views.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
combo/apps/wcs/views.py
57 57
    def post(self, request, *args, **kwargs):
58 58
        try:
59 59
            cell = TrackingCodeInputCell.objects.get(id=request.POST['cell'])
60
        except (ValueError, TrackingCodeInputCell.DoesNotExist):
60
        except (KeyError, ValueError, TrackingCodeInputCell.DoesNotExist):
61 61
            return HttpResponseBadRequest('Invalid cell id')
62 62
        code = request.POST['code']
63 63

  
64
-