Browse Source

py2 fix

pull/114/merge
Pēteris Caune 8 years ago
parent
commit
597d79abae
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      hc/front/views.py

+ 1
- 1
hc/front/views.py View File

@ -761,7 +761,7 @@ def telegram_bot(request):
try: try:
doc = json.loads(request.body.decode("utf-8")) doc = json.loads(request.body.decode("utf-8"))
jsonschema.validate(doc, telegram_callback) jsonschema.validate(doc, telegram_callback)
except json.decoder.JSONDecodeError:
except ValueError:
return HttpResponseBadRequest() return HttpResponseBadRequest()
except jsonschema.ValidationError: except jsonschema.ValidationError:
return HttpResponseBadRequest() return HttpResponseBadRequest()


Loading…
Cancel
Save