From ba220d59c966889b556cae6cd4b8cd0d680bf04c Mon Sep 17 00:00:00 2001 From: Chaiwat Suttipongsakul Date: Tue, 29 Jan 2019 12:07:30 +0700 Subject: [PATCH] handle missing root_id --- app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 795b28f..b09a491 100644 --- a/app.py +++ b/app.py @@ -964,7 +964,10 @@ def _build_thread(data, include_children=True): ): _flatten(snode, level=level + 1) - _flatten(idx[root_id]) + try: + _flatten(idx[root_id]) + except KeyError: + app.logger.info(f"{root_id} is not there! skipping") return thread