diff --git a/server/src/data/app.py b/server/src/data/app.py index 7c4a6f7..bc0b0ae 100644 --- a/server/src/data/app.py +++ b/server/src/data/app.py @@ -39,7 +39,8 @@ def mainpage(): cursor.execute("SELECT name, time, noshutdown FROM items ORDER BY name") items = cursor.fetchall() 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() return render_template('index.html', title='BS Shutdown', items=items, default_time=default_time)