X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/cc041eef8cd45e535ba702e46822d10f6939bfc5..1499c00bc696972ab79ecb6ea45e09b21014682b:/forum/views/commands.py diff --git a/forum/views/commands.py b/forum/views/commands.py index 83a6211..5271eec 100644 --- a/forum/views/commands.py +++ b/forum/views/commands.py @@ -75,6 +75,10 @@ class CannotDoubleActionException(CommandException): @decorate.withfn(command) def vote_post(request, id, vote_type): + if not request.method == 'POST': + raise CommandException(_("Invalid request")) + + post = get_object_or_404(Node, id=id).leaf user = request.user