diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2010-06-07 00:54:39 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2010-06-07 00:54:39 -0400 |
commit | 57033196f904477631c397fab50681f0d1aa7834 (patch) | |
tree | 59b49b40680af03ef5c0a31782c19737e404257b /forum/models/base.py | |
parent | 430ce40aea1fddd086640bbd54242e6832478e49 (diff) | |
download | askbot-57033196f904477631c397fab50681f0d1aa7834.tar.gz askbot-57033196f904477631c397fab50681f0d1aa7834.tar.bz2 askbot-57033196f904477631c397fab50681f0d1aa7834.zip |
notification records are correct but response counters are exxagerated. added unit tests for response counters
Diffstat (limited to 'forum/models/base.py')
-rw-r--r-- | forum/models/base.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/forum/models/base.py b/forum/models/base.py index 964c6142..d832b71c 100644 --- a/forum/models/base.py +++ b/forum/models/base.py @@ -126,11 +126,12 @@ def save_post(post, **kwargs): #create new mentions for u in newly_mentioned_users: from forum.models.user import Activity - Activity.objects.create_new_mention( - mentioned_whom = u, - mentioned_in = post, - mentioned_by = last_author - ) + if u != last_author: + Activity.objects.create_new_mention( + mentioned_whom = u, + mentioned_in = post, + mentioned_by = last_author + ) #todo: this is handled in signal because models for posts #are too spread out |