summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
Diffstat (limited to 'django')
-rw-r--r--django/db/models/functions/comparison.py5
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(
[