diff options
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( [ |
