diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2012-05-20 14:32:48 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2012-05-20 14:33:35 -0400 |
commit | 209ddd4952812b08d8428fe491372402abb290b4 (patch) | |
tree | 6a0034c41302a23010e59fa227ce7aa3f5666531 | |
parent | 46c894c1796ad8aa8d7a7d7bbd6dcd6f86998dad (diff) | |
download | askbot-209ddd4952812b08d8428fe491372402abb290b4.tar.gz askbot-209ddd4952812b08d8428fe491372402abb290b4.tar.bz2 askbot-209ddd4952812b08d8428fe491372402abb290b4.zip |
fixed a bug where reputation loss for dowvoting and receiving the downvote were swapped, spotted by zaf
-rw-r--r-- | askbot/auth.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/askbot/auth.py b/askbot/auth.py index eba24c80..c80f5db1 100644 --- a/askbot/auth.py +++ b/askbot/auth.py @@ -338,13 +338,15 @@ def onDownVoted(vote, post, user, timestamp=None): if not (post.wiki or post.is_anonymous): author = post.author - author.receive_reputation(askbot_settings.REP_LOSS_FOR_DOWNVOTING) + author.receive_reputation( + askbot_settings.REP_LOSS_FOR_RECEIVING_DOWNVOTE + ) author.save() question = post.thread._question_post() # TODO: this is suboptimal if post is already a question reputation = Repute(user=author, - negative=askbot_settings.REP_LOSS_FOR_DOWNVOTING, + negative=askbot_settings.REP_LOSS_FOR_RECEIVING_DOWNVOTE, question=question, reputed_at=timestamp, reputation_type=-3, @@ -352,12 +354,12 @@ def onDownVoted(vote, post, user, timestamp=None): reputation.save() user.receive_reputation( - askbot_settings.REP_LOSS_FOR_RECEIVING_DOWNVOTE + askbot_settings.REP_LOSS_FOR_DOWNVOTING, ) user.save() reputation = Repute(user=user, - negative=askbot_settings.REP_LOSS_FOR_RECEIVING_DOWNVOTE, + negative=askbot_settings.REP_LOSS_FOR_DOWNVOTING, question=question, reputed_at=timestamp, reputation_type=-5, |