]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/views/commands.py
accept only POST requests for vote_post command, make the ajax command send only...
[osqa.git] / forum / views / commands.py
index 51499a9fb26a9633955c71cb213f1f4e1b950e10..5271eec69d014aaf0591120096aa40ab67a29a1f 100644 (file)
@@ -75,7 +75,7 @@ class CannotDoubleActionException(CommandException):
 
 @decorate.withfn(command)
 def vote_post(request, id, vote_type):
-    if not request.is_ajax():
+    if not request.method == 'POST':
         raise CommandException(_("Invalid request"))