From 01eed1521a67afc04a8112b44ca4cd1c4a32cf00 Mon Sep 17 00:00:00 2001 From: hernani Date: Mon, 7 Jun 2010 00:14:09 +0000 Subject: [PATCH] Fixes a bug happening when processing an user reputation more than once in the same request cycle. git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@380 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- forum/models/action.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/forum/models/action.py b/forum/models/action.py index 1d2e773..77fdae4 100644 --- a/forum/models/action.py +++ b/forum/models/action.py @@ -289,11 +289,11 @@ class ActionRepute(models.Model): def save(self, *args, **kwargs): super(ActionRepute, self).save(*args, **kwargs) - self.user.reputation += self.value + self.user.reputation = models.F('reputation') + self.value self.user.save() def delete(self): - self.user.reputation -= self.value + self.user.reputation = models.F('reputation') - self.value self.user.save() super(ActionRepute, self).delete() -- 2.39.5