Commit 7a5fa28d authored by Lysander Trischler's avatar Lysander Trischler

Fix weight diagram data SELECT SQL query

parent 19a40beb
...@@ -749,11 +749,13 @@ if __name__ == "__main__": ...@@ -749,11 +749,13 @@ if __name__ == "__main__":
hourly[day.hour][day.discipline] += day.count hourly[day.hour][day.discipline] += day.count
weights = self.db.query(""" weights = self.db.query("""
SELECT date, grams/1000 AS kg SELECT date, kg
FROM weights FROM (SELECT date, grams/1000 AS kg
WHERE username = %s FROM weights
ORDER BY date WHERE username = %s
LIMIT 0, 100""", username) ORDER BY date DESC
LIMIT 0, 100) AS tmp
ORDER BY date ASC""", username)
self.render("user.html", self.render("user.html",
user=self.application.users[username], user=self.application.users[username],
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment