Skip to content

Commit 6a5bee0

Browse files
committed
changed warning to error
1 parent afb51bc commit 6a5bee0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cs50/sql.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -382,9 +382,9 @@ def teardown_appcontext(exception):
382382
elif command in ["DELETE", "UPDATE"]:
383383
ret = result.rowcount
384384

385-
# If constraint violated, return None
385+
# If constraint violated
386386
except sqlalchemy.exc.IntegrityError as e:
387-
self._logger.warning(termcolor.colored(statement, "yellow"))
387+
self._logger.error(termcolor.colored(statement, "red"))
388388
e = ValueError(e.orig)
389389
e.__cause__ = None
390390
raise e

0 commit comments

Comments
 (0)