mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-02-15 00:44:58 -05:00
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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user