]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/models/action.py
Resolves Jira OSQA-359, adding an option to allow negative user reputation in the...
[osqa.git] / forum / models / action.py
index 58ec7d55f145b90331128d86f66909c2f9ffebf9..3692d7bc85f96ab2144033234674f6ba5e42bf81 100644 (file)
@@ -300,7 +300,7 @@ class ActionRepute(models.Model):
         return 0
 
     def _add_to_rep(self, value):
-        if self.user.reputation + value < 1:
+        if (self.user.reputation + value < 1) and not settings.ALLOW_NEGATIVE_REPUTATION:
             return 0
         else:
             return models.F('reputation') + value