fix: edit_row default {} → None (Jinja2 truthy bug), init_db with app_context, add README

This commit is contained in:
2026-07-20 10:48:49 +04:00
parent 13b7a41a02
commit 9c14f70bc4
2 changed files with 53 additions and 2 deletions
+3 -2
View File
@@ -86,7 +86,7 @@ def index():
return redirect(url_for("index"))
# --- GET: список + форма редактирования ---
edit_row = {}
edit_row = None
edit_id = request.args.get("edit")
if edit_id:
cur.execute(
@@ -112,5 +112,6 @@ def index():
if __name__ == "__main__":
init_db()
with app.app_context():
init_db()
app.run(host="0.0.0.0", port=int(os.environ.get("PORT", 5000)), debug=False)