X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/cc041eef8cd45e535ba702e46822d10f6939bfc5..0a49c0f0860e251ec73d1b8d3d38be3f67dbbe82:/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