forked from rDrama/rDrama
master
parent
877c8f7ec8
commit
eb04274f2a
|
@ -248,8 +248,8 @@ def get_comments(cids, v=None, load_parent=False):
|
||||||
if load_parent:
|
if load_parent:
|
||||||
parents = [x.parent_comment_id for x in output if x.parent_comment_id]
|
parents = [x.parent_comment_id for x in output if x.parent_comment_id]
|
||||||
parents = get_comments(parents, v=v)
|
parents = get_comments(parents, v=v)
|
||||||
parents={x.id: x for x in parents}
|
parents = {x.id: x for x in parents}
|
||||||
for c in output: c._parent_comment=parents.get(c.parent_comment_id)
|
for c in output: c._parent_comment = parents.get(c.parent_comment_id)
|
||||||
|
|
||||||
return sorted(output, key=lambda x: cids.index(x.id))
|
return sorted(output, key=lambda x: cids.index(x.id))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue