summaryrefslogtreecommitdiffstats
path: root/forum/models/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'forum/models/base.py')
-rw-r--r--forum/models/base.py4
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