Skip to content

Commit

Permalink
Fix ommited json parsing wotsit
Browse files Browse the repository at this point in the history
  • Loading branch information
FreneticScribbler committed Jun 27, 2023
1 parent beb0ba9 commit 04c7e4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion RIGS/views/rigboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ def post(self, request, *args, **kwargs):
if not hmac.compare_digest(request.headers.get('X-Discourse-Event-Signature'), computed):
return HttpResponseForbidden('Invalid signature header')
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['topic']['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()
if event:
event.forum_url = "https://forum.nottinghamtec.co.uk/t/{}"
Expand Down

0 comments on commit 04c7e4b

Please sign in to comment.