From d4409c977466d40029aa378de0994f5f947b1e62 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Tue, 15 Jan 2019 00:21:41 +0100 Subject: [PATCH] _ --> . --- webserver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webserver.py b/webserver.py index 84e12a9e..b5487cb1 100644 --- a/webserver.py +++ b/webserver.py @@ -192,7 +192,7 @@ def page_password(): @app.route("/editprofile", methods=["GET", "POST"]) @require_login def page_editprofile(): - profile_data = fl_g.session.query(db.ProfileData).filter_by(royal_id=fl_g.user_id).join(db.Royal).one_or_none() + profile_data = fl_g.session.query(db.ProfileData).filter_by(royal_id=fl_g.user.id).join(db.Royal).one_or_none() if request.method == "GET": return render_template("profileedit.html", data=profile_data) elif request.method == "POST": @@ -202,7 +202,7 @@ def page_editprofile(): abort(400) return if profile_data is None: - profile_data = db.ProfileData(royal_id=fl_g.user_id, css=css, bio=bio) + profile_data = db.ProfileData(royal_id=fl_g.user.id, css=css, bio=bio) fl_g.session.add(profile_data) fl_g.session.flush() profile_data.royal.fiorygi += 1 @@ -218,7 +218,7 @@ def page_editprofile(): profile_data.css = css profile_data.bio = bio fl_g.session.commit() - royal = fl_g.session.query(db.Royal).filter_by(id=fl_g.user_id).one() + royal = fl_g.session.query(db.Royal).filter_by(id=fl_g.user.id).one() return redirect(url_for("page_profile", name=royal.username))