Skip to content

Commit 08a6636

Browse files
author
Kareem Zidane
committed
use remove instead of rollback
1 parent f6912d2 commit 08a6636

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cs50/sql.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def _execute(self, statement):
6464
except sqlalchemy.exc.IntegrityError as exc:
6565
_logger.debug(termcolor.colored(str(statement), "yellow"))
6666
if self._autocommit:
67-
self._session.execute("ROLLBACK")
67+
self._session.remove()
6868
raise ValueError(exc.orig) from None
6969
except (sqlalchemy.exc.OperationalError, sqlalchemy.exc.ProgrammingError) as exc:
7070
self._session.remove()

0 commit comments

Comments
 (0)