diff --git a/RIGS/views/rigboard.py b/RIGS/views/rigboard.py index 5371510a..0f619040 100644 --- a/RIGS/views/rigboard.py +++ b/RIGS/views/rigboard.py @@ -398,11 +398,14 @@ class CreateForumThread(generic.base.RedirectView): 'body': 'https://rigs.nottinghamtec.co.uk/event/{}'.format(event.pk, event.pk), 'category': 'rig-info' } - return 'https://forum.nottinghamtec.co.uk/new-topic' + "?" + urllib.parse.urlencode(params) + return f'https://forum.nottinghamtec.co.uk/new-topic?{}'.format(urllib.parse.urlencode(params)) class RecieveForumWebhook(generic.View): - @csrf_exempt + @method_decorator(csrf_exempt) + def dispatch(self, request, *args, **kwargs): + return super().dispatch(request, *args, **kwargs) + def post(self, request, *args, **kwargs): if request.POST.get('secret') == env('FORUM_WEBHOOK_SECRET'): event_id = BeautifulSoup(request.POST.get('body'), "html.parser")