]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/models/node.py
Fix in untranslateable string.
[osqa.git] / forum / models / node.py
index 7c09189b7f1228858d5a232f646a26cfaa2b2dcd..19973e9e3c4744c20e3ce490c72a1d753e8e44ba 100644 (file)
@@ -257,16 +257,11 @@ class Node(BaseModel, NodeContent):
 \r
     @staticmethod\r
     def isSpam(comment, data):\r
 \r
     @staticmethod\r
     def isSpam(comment, data):\r
-        api = Akismet()\r
-\r
-        if not api.key:\r
+        if not settings.WORDPRESS_API_KEY:\r
             return False\r
             return False\r
-        else:\r
-            if api.comment_check(comment, data):\r
-                return True\r
-            else:\r
-                return False\r
-        return data\r
+            \r
+        api = Akismet(settings.WORDPRESS_API_KEY, settings.APP_URL)\r
+        return api.comment_check(comment, data)\r
 \r
     class Meta:\r
         app_label = 'forum'\r
 \r
     class Meta:\r
         app_label = 'forum'\r