Compare commits
2 Commits
6e50013a84
...
0a9934b889
| Author | SHA1 | Date | |
|---|---|---|---|
| 0a9934b889 | |||
| 8ad1650079 |
@@ -24,6 +24,7 @@ CREATE TABLE IF NOT EXISTS val (
|
||||
default_time TEXT NOT NULL DEFAULT '21:00'
|
||||
)
|
||||
""")
|
||||
cursor.execute("INSERT INTO settings (default_time) VALUES (?)", ('21:00',))
|
||||
conn.commit()
|
||||
conn.close()
|
||||
|
||||
@@ -40,7 +41,7 @@ def mainpage():
|
||||
items = cursor.fetchall()
|
||||
cursor.execute("SELECT default_time FROM val")
|
||||
default_time_row = cursor.fetchone()
|
||||
default_time = default_time_row[0] if default_time_row else None
|
||||
default_time = default_time_row[0] if default_time_row else '21:00'
|
||||
conn.close()
|
||||
return render_template('index.html', title='BS Shutdown', items=items, default_time=default_time)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user