Commit 9b7ff965 authored by Michal Čihař's avatar Michal Čihař

Fix reply parsing

parent d096ae50
......@@ -32,8 +32,8 @@ def github_hook(request):
if request.method != 'POST':
return HttpResponseNotAllowed(['POST'])
try:
data = json.loads(request.raw_post_data)
except ValueError:
data = json.loads(request.POST['payload'])
except (ValueError, KeyError):
return HttpResponseBadRequest('could not parse json!')
repo = 'git://github.com/%s/%s.git' % (
data['repository']['owner']['name'],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment