]> git.openstreetmap.org Git - osqa.git/commitdiff
Fixes a bug happening when processing an user reputation more than once in the same...
authorhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Mon, 7 Jun 2010 00:14:09 +0000 (00:14 +0000)
committerhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Mon, 7 Jun 2010 00:14:09 +0000 (00:14 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@380 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum/models/action.py

index 1d2e773bb54f882db47356bf64fdf08e45d92597..77fdae4f7a7d3f75ff8c1d0c066bf34be2b11e0e 100644 (file)
@@ -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()