From e2741819830dc2afe4ad63810d468240ab1a2adb Mon Sep 17 00:00:00 2001 From: schneefux Date: Sat, 28 May 2016 20:53:34 +0200 Subject: fix form submits not working on pages --- app.py | 6 +++--- templates/index.html | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app.py b/app.py index 78c97f2..51059d1 100644 --- a/app.py +++ b/app.py @@ -50,13 +50,13 @@ class dbProxy(object): def voteJoke(self, objectId, down): if down: - self.c.execute("UPDATE jokes SET downvotes=downvotes+1 WHERE id=?", (objectId)) + self.c.execute("UPDATE jokes SET downvotes=downvotes+1 WHERE id=?", (objectId,)) else: - self.c.execute("UPDATE jokes SET upvotes=upvotes+1 WHERE id=?", (objectId)) + self.c.execute("UPDATE jokes SET upvotes=upvotes+1 WHERE id=?", (objectId,)) self.conn.commit() def reportJoke(self, objectId): - self.c.execute("UPDATE jokes SET reports=reports+1 WHERE id=?", (objectId)) + self.c.execute("UPDATE jokes SET reports=reports+1 WHERE id=?", (objectId,)) self.conn.commit() diff --git a/templates/index.html b/templates/index.html index 277a948..f8bfa2c 100644 --- a/templates/index.html +++ b/templates/index.html @@ -16,12 +16,12 @@
-
+
-
+
- +
-- cgit v1.3.1