From ebb086ecb245e3bc7ad96545e41d61f38c921f80 Mon Sep 17 00:00:00 2001 From: Socks Date: Thu, 22 Feb 2018 18:55:08 +0000 Subject: [PATCH] Fixed bug with infinite looping to get parents --- backend/timeline.py | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/timeline.py b/backend/timeline.py index 34410a5..2764496 100644 --- a/backend/timeline.py +++ b/backend/timeline.py @@ -74,4 +74,5 @@ def get_full_replies(post_id): while get_parent(replies[-1]["_id"]): print(replies[-1]) replies.append(get_parent(post_id)) + post_id = get_parent(post_id)['_id'] return replies[::-1]