Skip to content

Commit

Permalink
Fix string index
Browse files Browse the repository at this point in the history
  • Loading branch information
FreneticScribbler committed Jun 27, 2023
1 parent 3c4ccfb commit 2171d7f
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['topic']['title'][1:5]) # find the ID, force convert it to an int to eliminate leading zeros
event_id = int(body['topic']['title'][1:6]) # 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 = f"https://forum.nottinghamtec.co.uk/t/{body['topic']['slug']}"
Expand Down

0 comments on commit 2171d7f

Please sign in to comment.