Browse Source

Fix db_helper: fix typo and re-throw exception

StrayWarrior 7 months ago
parent
commit
7402f96eb9
1 changed files with 2 additions and 1 deletions
  1. 2 1
      db_helper.py

+ 2 - 1
db_helper.py

@@ -385,7 +385,8 @@ class MysqlHelper(object):
                 conn.commit()
         except pymysql.MySQLError as e:
             print(f"Error in batch_insert: {e}")
-            connection.rollback()
+            conn.rollback()
+            raise e
         conn.close()