diff options
| author | John Parton <john.parton.iv@gmail.com> | 2024-09-05 21:53:11 -0500 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2024-09-26 10:19:34 -0400 |
| commit | f22ff4561ada77be98ca4db3ce117caca897696e (patch) | |
| tree | 4561c1eea7a916ae1fadbb443a24a84affa5e263 /django | |
| parent | 5f0ed95e103d341e8839dedcdaaf551dde9522cf (diff) | |
Fixed #35734 -- Used JSONB_BUILD_OBJECT database function on PostgreSQL when using server-side bindings.
Regression in 81ccf92f154c6d9eac3e30bac0aa67574d0ace15.
Diffstat (limited to 'django')
| -rw-r--r-- | django/db/models/functions/comparison.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/django/db/models/functions/comparison.py b/django/db/models/functions/comparison.py index 6db81d6f46..d06f0a25a4 100644 --- a/django/db/models/functions/comparison.py +++ b/django/db/models/functions/comparison.py @@ -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( [ |
