convert last_grass_touch_time to float so it can subtract in jinja2

This commit is contained in:
csd4ni3l
2025-08-15 16:05:53 +02:00
parent 9ecb9b8c9a
commit eef9e5eef1

View File

@@ -272,7 +272,7 @@ def profile():
grass_touching_count, last_grass_touch_time = row grass_touching_count, last_grass_touch_time = row
return render_template("profile.jinja2", username=username, grass_touching_count=grass_touching_count, last_grass_touch_time=last_grass_touch_time, now=time.time(), your_account=True) return render_template("profile.jinja2", username=username, grass_touching_count=grass_touching_count, last_grass_touch_time=float(last_grass_touch_time), now=time.time(), your_account=True)
@app.route("/profile/<username>") @app.route("/profile/<username>")
def public_profile(username): def public_profile(username):
@@ -289,7 +289,7 @@ def public_profile(username):
grass_touching_count, last_grass_touch_time = row grass_touching_count, last_grass_touch_time = row
return render_template("profile.jinja2", username=username, grass_touching_count=grass_touching_count, last_grass_touch_time=last_grass_touch_time, now=time.time(), your_account=False) return render_template("profile.jinja2", username=username, grass_touching_count=grass_touching_count, last_grass_touch_time=float(last_grass_touch_time), now=time.time(), your_account=False)
@app.route("/login", methods=["GET", "POST"]) @app.route("/login", methods=["GET", "POST"])
def login(): def login():