diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2010-05-31 22:31:20 -0700 |
---|---|---|
committer | fadeev <fadeev@bacchus.bio.uci.edu> | 2010-05-31 22:32:25 -0700 |
commit | 5dfebd5164518572b9f1c9822990ee476854304d (patch) | |
tree | 59367e36177a8bfe58e0ff59453cb4ec1c6b334e /forum/models/base.py | |
parent | f5cd9612ec2d58d3f2da218a254ad011052b46ce (diff) | |
download | askbot-5dfebd5164518572b9f1c9822990ee476854304d.tar.gz askbot-5dfebd5164518572b9f1c9822990ee476854304d.tar.bz2 askbot-5dfebd5164518572b9f1c9822990ee476854304d.zip |
fixed some bugs in comment posting and made progress in instant notifications
Diffstat (limited to 'forum/models/base.py')
-rw-r--r-- | forum/models/base.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/forum/models/base.py b/forum/models/base.py index e90bc7a0..110c0deb 100644 --- a/forum/models/base.py +++ b/forum/models/base.py @@ -26,6 +26,7 @@ def render_post_text_and_get_newly_mentioned_users(post, text = html.urlize(text) if '@' not in text: + post.html = text return list() from forum.models.user import Activity @@ -36,6 +37,7 @@ def render_post_text_and_get_newly_mentioned_users(post, anticipated_authors = op.get_author_list( include_comments = True, recursive = True ) extra_name_seeds = markup.extract_mentioned_name_seeds(text) + extra_authors = set() for name_seed in extra_name_seeds: extra_authors.update(User.objects.filter(username__startswith = name_seed)) @@ -46,7 +48,7 @@ def render_post_text_and_get_newly_mentioned_users(post, mentioned_authors, post.html = markup.mentionize_text(text, anticipated_authors) #maybe delete some previous mentions - if self.id != None: + if post.id != None: #only look for previous mentions if post was already saved before prev_mention_qs = Activity.objects.get_mentions( mentioned_in = post |