Fixed bug with infinite looping to get parents

This commit is contained in:
Socks 2018-02-22 18:55:08 +00:00
parent 17a3cf0491
commit ebb086ecb2

View file

@ -74,4 +74,5 @@ def get_full_replies(post_id):
while get_parent(replies[-1]["_id"]): while get_parent(replies[-1]["_id"]):
print(replies[-1]) print(replies[-1])
replies.append(get_parent(post_id)) replies.append(get_parent(post_id))
post_id = get_parent(post_id)['_id']
return replies[::-1] return replies[::-1]