Fixed BUG-121: crashing when cannot find a match when searching
This commit is contained in:
3
files.py
3
files.py
@@ -283,6 +283,9 @@ def GetEntriesInSearchView( OPT ):
|
||||
with db.engine.connect() as conn:
|
||||
OPT.num_entries = conn.execute( text( num_e_sql ) ).first().count
|
||||
|
||||
if OPT.num_entries == 0:
|
||||
return []
|
||||
|
||||
last_entry_sql= f"{sel_no_order} order by {OPT.last_order_raw} limit 1"
|
||||
with db.engine.connect() as conn:
|
||||
OPT.last_eid = conn.execute( text( last_entry_sql ) ).first().id
|
||||
|
||||
Reference in New Issue
Block a user