diff --git a/__pycache__/app.cpython-313.pyc b/__pycache__/app.cpython-313.pyc index 1685baa..0dc430f 100644 Binary files a/__pycache__/app.cpython-313.pyc and b/__pycache__/app.cpython-313.pyc differ diff --git a/app.py b/app.py index 1786f63..f4c2aa6 100644 --- a/app.py +++ b/app.py @@ -278,7 +278,8 @@ def admin_required(f): @login_manager.user_loader def load_user(id): - return User.query.get(int(id)) + # Verwende session.get() anstelle von query.get() für SQLAlchemy 2.0 Kompatibilität + return db.session.get(User, int(id)) # Routes for authentication @app.route('/login', methods=['GET', 'POST']) diff --git a/templates/profile.html b/templates/profile.html index a797b24..e464026 100644 --- a/templates/profile.html +++ b/templates/profile.html @@ -613,16 +613,37 @@