From 1f8efbd0c7e6338764cc78c2254f8b71d7967dc7 Mon Sep 17 00:00:00 2001 From: Miguel Gonzalez Date: Fri, 12 Jul 2013 18:50:40 +0000 Subject: Add commit on update school After an UPDATE statement a commit is needed. --- diff --git a/stats_consolidation/db.py b/stats_consolidation/db.py index c2bf028..5b03e65 100644 --- a/stats_consolidation/db.py +++ b/stats_consolidation/db.py @@ -415,6 +415,8 @@ class DB_Stats: cursor.execute ("UPDATE Users SET school = %s WHERE machine_sn = %s", (school, machine_sn)) except mysql.connector.Error as err: log.error("MySQL on %s: %s", cursor.statement, err) + else: + self.cnx.commit() cursor.close() -- cgit v0.9.1