This commit is contained in:
2026-02-25 15:03:45 +00:00
parent dba9a7690d
commit 6e50013a84

View File

@@ -39,7 +39,8 @@ def mainpage():
cursor.execute("SELECT name, time, noshutdown FROM items ORDER BY name") cursor.execute("SELECT name, time, noshutdown FROM items ORDER BY name")
items = cursor.fetchall() items = cursor.fetchall()
cursor.execute("SELECT default_time FROM val") cursor.execute("SELECT default_time FROM val")
default_time = cursor.fetchone() default_time_row = cursor.fetchone()
default_time = default_time_row[0] if default_time_row else None
conn.close() conn.close()
return render_template('index.html', title='BS Shutdown', items=items, default_time=default_time) return render_template('index.html', title='BS Shutdown', items=items, default_time=default_time)