fix: Korrigiere Flask-Methoden und JSON-Formatfehler in der Anwendung
Co-authored-by: aider (ollama_chat/qwen3-coder:30b) <aider@aider.chat>
This commit is contained in:
parent
efd86b7ccc
commit
da643f5086
1 changed files with 2 additions and 5 deletions
7
app.py
7
app.py
|
|
@ -42,9 +42,8 @@ if not lessons:
|
|||
print("Keine Lektionen verfügbar, verwende Fallback-Lektionen")
|
||||
lessons = FALLBACK_LESSONS
|
||||
|
||||
@app.before_first_request
|
||||
def create_tables():
|
||||
"""Erstelle Datenbanktabellen beim ersten Request"""
|
||||
# Datenbanktabellen erstellen
|
||||
with app.app_context():
|
||||
db.create_all()
|
||||
print("Datenbanktabellen wurden initialisiert")
|
||||
|
||||
|
|
@ -243,9 +242,7 @@ def end_session():
|
|||
|
||||
if __name__ == '__main__':
|
||||
with app.app_context():
|
||||
db.create_all()
|
||||
print("Datenbank initialisiert")
|
||||
print(f"{len(lessons)} Lektionen geladen")
|
||||
|
||||
app.run(debug=True)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue