Compare commits
2 Commits
081915dacf
...
800ccd8376
| Author | SHA1 | Date | |
|---|---|---|---|
| 800ccd8376 | |||
|
|
fca9462bc7 |
3
app.py
3
app.py
@@ -129,7 +129,8 @@ def index():
|
||||
@app.route('/danke')
|
||||
def danke():
|
||||
id = request.args.get('id')
|
||||
adresse = Adresse.query.get(id)
|
||||
# Use session.get to avoid SQLAlchemy LegacyAPIWarning and cast id to int if present
|
||||
adresse = db.session.get(Adresse, int(id)) if id else None
|
||||
return render_template('danke.html', adresse=adresse)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user