fix a bug where adding a comment to a comment tree that isn't cached creates a

broken comment page.
This commit is contained in:
spez
2009-07-31 13:56:55 -07:00
parent a8331fd43a
commit 58d101e75b

View File

@@ -42,6 +42,11 @@ def add_comment_nolock(comment):
cids, comment_tree, depth, num_children = link_comments(link_id)
#make sure we haven't already done this before (which would happen
#if the tree isn't cached when you add a comment)
if comment._id in cids:
return
#add to comment list
cids.append(comment._id)