We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent afb51bc commit 6a5bee0Copy full SHA for 6a5bee0
src/cs50/sql.py
@@ -382,9 +382,9 @@ def teardown_appcontext(exception):
382
elif command in ["DELETE", "UPDATE"]:
383
ret = result.rowcount
384
385
- # If constraint violated, return None
+ # If constraint violated
386
except sqlalchemy.exc.IntegrityError as e:
387
- self._logger.warning(termcolor.colored(statement, "yellow"))
+ self._logger.error(termcolor.colored(statement, "red"))
388
e = ValueError(e.orig)
389
e.__cause__ = None
390
raise e
0 commit comments