From 8b8e4c83d5d90a663bc903c75f7986c4d108d811 Mon Sep 17 00:00:00 2001 From: hernani Date: Sat, 9 Apr 2011 02:07:10 +0000 Subject: [PATCH] Don't let reputation go 0, it may cause mysql to overflow. git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@944 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- forum/models/action.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forum/models/action.py b/forum/models/action.py index dc29a02..58ec7d5 100644 --- a/forum/models/action.py +++ b/forum/models/action.py @@ -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 -- 2.39.5