diff --git a/treeherder/model/management/commands/run_sql.py b/treeherder/model/management/commands/run_sql.py index 3614ea9df..a9c7e51c9 100644 --- a/treeherder/model/management/commands/run_sql.py +++ b/treeherder/model/management/commands/run_sql.py @@ -75,8 +75,8 @@ class Command(BaseCommand): ) try: cursor = conn.cursor() + conn.autocommit(True) cursor.execute(sql_code) - conn.commit() self.stdout.write("Sql code executed on {}:".format(datasource)) for row in cursor: self.stdout.write(" {}".format(row))