]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/models/action.py
Don't let reputation go 0, it may cause mysql to overflow.
[osqa.git] / forum / models / action.py
index dc29a024f75d3a1fbf814811650ec5cbb7a6efdb..58ec7d55f145b90331128d86f66909c2f9ffebf9 100644 (file)
@@ -300,7 +300,7 @@ class ActionRepute(models.Model):
         return 0
 
     def _add_to_rep(self, value):
-        if self.user.reputation + value < 0:
+        if self.user.reputation + value < 1:
             return 0
         else:
             return models.F('reputation') + value