summaryrefslogtreecommitdiffstats
path: root/askbot/models/question.py
diff options
context:
space:
mode:
Diffstat (limited to 'askbot/models/question.py')
-rw-r--r--askbot/models/question.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/askbot/models/question.py b/askbot/models/question.py
index a068224d..039c37f2 100644
--- a/askbot/models/question.py
+++ b/askbot/models/question.py
@@ -1097,6 +1097,7 @@ class Thread(models.Model):
post__id__in=post_ids,
revision=0
)
+
#get ids of posts that we need to patch with suggested data
if len(suggested_revs):
#find posts that we need to patch
@@ -1113,7 +1114,7 @@ class Thread(models.Model):
found.update(find_posts(comments, need_ids))
return found
- suggested_post_ids = set([rev.post_id for rev in suggested_revs])
+ suggested_post_ids = [rev.post_id for rev in suggested_revs]
question = post_data[0]
answers = post_data[1]
@@ -1132,7 +1133,10 @@ class Thread(models.Model):
rev = rev_map[post_id]
#patching work
post.text = rev.text
- post.html = post.parse_post_text()['html']
+ parse_data = post.parse_post_text()
+ post.html = parse_data['html']
+ post.summary = post.get_snippet()
+
post_to_author[post_id] = rev.author_id
post.set_runtime_needs_moderation()
@@ -1159,6 +1163,7 @@ class Thread(models.Model):
rev = rev_map[post.id]
post.text = rev.text
post.html = post.parse_post_text()['html']
+ post.summary = post.get_snippet()
post_to_author[post.id] = rev.author_id
if post.is_comment():
parents = find_posts(all_posts, set([post.parent_id]))