fd
This commit is contained in:
parent
64c47c124f
commit
d7244ef901
1 changed files with 2 additions and 0 deletions
|
@ -248,6 +248,8 @@ def get_comments(cids, v=None, load_parent=False):
|
|||
if load_parent:
|
||||
parents = [x.parent_comment_id for x in output if x.parent_comment_id]
|
||||
parents = get_comments(parents, v=v)
|
||||
parents={x.id: x for x in parents}
|
||||
for c in output: c._parent_comment=parents.get(c.parent_comment_id)
|
||||
|
||||
return sorted(output, key=lambda x: cids.index(x.id))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue