diff options
| author | Krishnaprasad MG <krishna@holvi.com> | 2025-12-15 15:39:06 +0100 |
|---|---|---|
| committer | Jacob Walls <jacobtylerwalls@gmail.com> | 2025-12-19 12:58:29 -0500 |
| commit | 7a2f35b1b755b20a1e4d290a88bf059e6897f798 (patch) | |
| tree | fba0bbd7a6f6475645b8262f443652da5b5d1c58 /django/test | |
| parent | 60fecd1d445224fa00385f5f1fde75999da7bec8 (diff) | |
Fixed #36487 -- Fixed logger error message with partial callbacks.
Diffstat (limited to 'django/test')
| -rw-r--r-- | django/test/testcases.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/django/test/testcases.py b/django/test/testcases.py index c587f770a6..c56fa52806 100644 --- a/django/test/testcases.py +++ b/django/test/testcases.py @@ -1523,11 +1523,11 @@ class TestCase(TransactionTestCase): try: callback() except Exception as e: - logger.error( - f"Error calling {callback.__qualname__} in " - f"on_commit() (%s).", + name = getattr(callback, "__qualname__", callback) + logger.exception( + "Error calling %s in on_commit() (%s).", + name, e, - exc_info=True, ) else: callback() |
