Skip to content

Commit

Permalink
Merge pull request jam-py#323 from caccia86/Autocommit-Fix
Browse files Browse the repository at this point in the history
Fix orphan begin/tran
  • Loading branch information
platipusica authored Jun 21, 2024
2 parents e506330 + f3a6d09 commit ecc74ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jam/db/mssql.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@

def connect(database, user, password, host, port, encoding, server):
if encoding:
return pymssql.connect(server=server, database=database, user=user, password=password, host=host, port=port, charset=encoding)
return pymssql.connect(server=server, database=database, user=user, password=password, host=host, port=port, charset=encoding, autocommit=True)
else:
return pymssql.connect(server=server, database=database, user=user, password=password, host=host, port=port)
return pymssql.connect(server=server, database=database, user=user, password=password, host=host, port=port, autocommit=True)

def get_lastrowid(cursor):
return cursor.lastrowid
Expand Down

0 comments on commit ecc74ac

Please sign in to comment.