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