mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
wf work
This commit is contained in:
@@ -75,7 +75,6 @@ class DB():
|
||||
|
||||
return arr
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
def upgradeDB(self):
|
||||
"""
|
||||
@@ -929,4 +928,19 @@ def get_all_devices(db):
|
||||
return db.read(sql_devices_all)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
def get_array_from_sql_rows(rows):
|
||||
# Convert result into list of lists
|
||||
arr = []
|
||||
for row in rows:
|
||||
if isinstance(row, sqlite3.Row):
|
||||
arr.append(list(row)) # Convert row to list
|
||||
elif isinstance(row, (tuple, list)):
|
||||
arr.append(list(row)) # Already iterable, just convert to list
|
||||
else:
|
||||
arr.append([row]) # Handle single values safely
|
||||
|
||||
return arr
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user