dont crash server if we have not scanned the Path yet

This commit is contained in:
2025-10-04 10:34:54 +10:00
parent d019dc7960
commit 525b823632

View File

@@ -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