Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Gonzalez <migonzalvar@activitycentral.com>2013-07-12 18:50:40 (GMT)
committer Miguel Gonzalez <migonzalvar@activitycentral.com>2013-07-12 19:12:15 (GMT)
commit1f8efbd0c7e6338764cc78c2254f8b71d7967dc7 (patch)
treee721051a6c6d3d0c2d86a156a86fde9e5e7e559f
parent898f283bb2a545560e932aafde76fefb81a56c8e (diff)
Add commit on update schoolfix-commit-on-update-school
After an UPDATE statement a commit is needed.
-rw-r--r--stats_consolidation/db.py2
1 files changed, 2 insertions, 0 deletions
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()