diff options
| author | Kanin Kearpimy <kanin.kearpimy@gmail.com> | 2026-03-11 13:06:40 +0000 |
|---|---|---|
| committer | Jacob Walls <jacobtylerwalls@gmail.com> | 2026-03-16 11:53:25 -0400 |
| commit | d7bf84324fb4b0789302bd0624697ba973dd7140 (patch) | |
| tree | 6031d498b1f48d5ec9a7841212704f5b8d083138 /django | |
| parent | ad5ea292748246b2f07f3e379a250985c1ebcba5 (diff) | |
Fixed #36906 -- Handled coalescing JSON-primitive strings and JSON values on Oracle.
Diffstat (limited to 'django')
| -rw-r--r-- | django/db/models/functions/comparison.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/django/db/models/functions/comparison.py b/django/db/models/functions/comparison.py index 8f7493f2fd..5827925e6e 100644 --- a/django/db/models/functions/comparison.py +++ b/django/db/models/functions/comparison.py @@ -86,9 +86,10 @@ class Coalesce(Func): return None def as_oracle(self, compiler, connection, **extra_context): - # Oracle prohibits mixing TextField (NCLOB) and CharField (NVARCHAR2), - # so convert all fields to NCLOB when that type is expected. - if self.output_field.get_internal_type() == "TextField": + # Oracle prohibits mixing TextField, JSONField (NCLOB) and CharField + # (NVARCHAR2), so convert all fields to NCLOB when that type is + # expected. + if self.output_field.get_internal_type() in ("TextField", "JSONField"): clone = self.copy() clone.set_source_expressions( [ |
