mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #35712 -- Prevented Q.check() from leaving the connection in an unusable state.
Co-authored-by: Simon Charette <charette.s@gmail.com>
This commit is contained in:
committed by
Sarah Boyce
parent
387475c5b2
commit
c6a4f853c7
@@ -1,4 +1,5 @@
|
||||
from django.core.exceptions import FieldError
|
||||
from django.db import connection
|
||||
from django.db.models import (
|
||||
BooleanField,
|
||||
Exists,
|
||||
@@ -327,3 +328,6 @@ class QCheckTests(TestCase):
|
||||
f"Got a database error calling check() on {q!r}: ",
|
||||
cm.records[0].getMessage(),
|
||||
)
|
||||
|
||||
# We must leave the connection in a usable state (#35712).
|
||||
self.assertTrue(connection.is_usable())
|
||||
|
||||
Reference in New Issue
Block a user