mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-25 01:12:16 +00:00
Fix import, again
This commit is contained in:
@@ -413,7 +413,7 @@ class RecieveForumWebhook(generic.View):
|
|||||||
print(computed)
|
print(computed)
|
||||||
if not hmac.compare_digest(request.headers.get('X-Discourse-Event-Signature'), computed):
|
if not hmac.compare_digest(request.headers.get('X-Discourse-Event-Signature'), computed):
|
||||||
return HttpResponseForbidden('Invalid signature header')
|
return HttpResponseForbidden('Invalid signature header')
|
||||||
body = json.loads(request.body.decode('utf-8'))
|
body = simplejson.loads(request.body.decode('utf-8'))
|
||||||
event_id = int(body['title'][1:5]) # find the ID, force convert it to an int to eliminate leading zeros
|
event_id = int(body['title'][1:5]) # find the ID, force convert it to an int to eliminate leading zeros
|
||||||
event = models.Event.objects.filter(pk=event_id).first()
|
event = models.Event.objects.filter(pk=event_id).first()
|
||||||
if event:
|
if event:
|
||||||
|
|||||||
Reference in New Issue
Block a user