dont crash server if we have not scanned the Path yet
This commit is contained in:
5
files.py
5
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
|
# 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_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
|
# used to know the parent/root (in folder view), in flat view - just ignore/safe though
|
||||||
query_data['root_eid']=dir_id
|
query_data['root_eid']=dir_id
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user