mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
Another fix to get_table_json
IIteration error is not a SQL error, so gotta catch generic errors, too
This commit is contained in:
@@ -200,7 +200,9 @@ def get_table_json(sql, sql_query):
|
|||||||
except sqlite3.Error as e:
|
except sqlite3.Error as e:
|
||||||
mylog('verbose', ['[Database] - SQL ERROR: ', e])
|
mylog('verbose', ['[Database] - SQL ERROR: ', e])
|
||||||
return json_obj({"data": []}, []) # return empty object
|
return json_obj({"data": []}, []) # return empty object
|
||||||
|
except Exception as e:
|
||||||
|
mylog('verbose', ['[Database] - Unexpected ERROR: ', e])
|
||||||
|
return json_obj({"data": []}, [])
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
class json_obj:
|
class json_obj:
|
||||||
|
|||||||
Reference in New Issue
Block a user