From 525b823632e34549882e60b36aad0f6f5343b135 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Sat, 4 Oct 2025 10:34:54 +1000 Subject: [PATCH] dont crash server if we have not scanned the Path yet --- files.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/files.py b/files.py index d2ba1bd..2b11d87 100644 --- a/files.py +++ b/files.py @@ -368,7 +368,10 @@ def GetQueryData( OPT ): ) # this should return the 1 Dir (that we want to see the content of) - and with only 1, no need to worry about order dir_arr=db.session.execute(dir_stmt).scalars().all() - dir_id=dir_arr[0] + if dir_arr: + dir_id=dir_arr[0] + else: + dir_id=0 # used to know the parent/root (in folder view), in flat view - just ignore/safe though query_data['root_eid']=dir_id