Skip to content

Commit 3930b94

Browse files
committed
Support Django 6.2's handling of booleans for non-postgresql databases.
1 parent 198304a commit 3930b94

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

docs/changes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Pending
3232
``debug_toolbar_urls``.
3333
* Fixed cookie ``expires`` calculation in ``djdt.cookie.set``.
3434
* Account for the new ``CULL_PROBABILITY`` in Django 6.2 in tests.
35+
* Support Django 6.2's handling of booleans for non-postgresql databases.
3536

3637
6.3.0 (2026-04-01)
3738
------------------

tests/panels/test_sql.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,9 +399,16 @@ def test_param_conversion(self):
399399
# ensure query was logged
400400
self.assertEqual(len(self.panel._queries), 3)
401401

402-
if connection.vendor == "mysql" and django.VERSION >= (4, 1):
402+
if (
403+
connection.vendor == "mysql"
404+
and django.VERSION >= (4, 1)
405+
or connection.vendor != "postgresql"
406+
and django.VERSION >= (6, 2)
407+
):
403408
# Django 4.1 started passing true/false back for boolean
404409
# comparisons in MySQL.
410+
# Django 6.2 started passing true/false for all-non
411+
# postgres databases.
405412
expected_bools = '["Foo", true, false]'
406413
else:
407414
expected_bools = '["Foo"]'

0 commit comments

Comments
 (0)