mirror of https://github.com/django/django.git
Fixed #35734 -- Used JSONB_BUILD_OBJECT database function on PostgreSQL when using server-side bindings.
Regression in 81ccf92f15
.
This commit is contained in:
parent
5f0ed95e10
commit
f22ff4561a
|
@ -175,7 +175,10 @@ class JSONObject(Func):
|
|||
)
|
||||
|
||||
def as_postgresql(self, compiler, connection, **extra_context):
|
||||
if not connection.features.is_postgresql_16:
|
||||
if (
|
||||
not connection.features.is_postgresql_16
|
||||
or connection.features.uses_server_side_binding
|
||||
):
|
||||
copy = self.copy()
|
||||
copy.set_source_expressions(
|
||||
[
|
||||
|
|
|
@ -12,3 +12,6 @@ Bugfixes
|
|||
* Fixed a regression in Django 5.1 that caused a crash when using the
|
||||
PostgreSQL lookup :lookup:`trigram_similar` on output fields from ``Concat``
|
||||
(:ticket:`35732`).
|
||||
|
||||
* Fixed a regression in Django 5.1 that caused a crash of ``JSONObject()``
|
||||
when using server-side binding with PostgreSQL 16+ (:ticket:`35734`).
|
||||
|
|
Loading…
Reference in New Issue