From 597d79abaef4b914f8a8f4c1ff8732827632fbc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Thu, 11 May 2017 13:04:41 +0300 Subject: [PATCH] py2 fix --- hc/front/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hc/front/views.py b/hc/front/views.py index 1b2a428f..61107246 100644 --- a/hc/front/views.py +++ b/hc/front/views.py @@ -761,7 +761,7 @@ def telegram_bot(request): try: doc = json.loads(request.body.decode("utf-8")) jsonschema.validate(doc, telegram_callback) - except json.decoder.JSONDecodeError: + except ValueError: return HttpResponseBadRequest() except jsonschema.ValidationError: return HttpResponseBadRequest()