1
0
mirror of https://github.com/django/django.git synced 2025-06-13 15:39:13 +00:00

[5.2.x] Refs #36419 -- Fixed BulkUpdateTests.test_json_field_sql_null() crash on Oracle.

Follow up to c1fa3fdd040718356e5a3b9a0fe699d73f47a940.

Backport of f5441e42da691ee2e7aeeb9be70f98e2bce6d17d from main.
This commit is contained in:
Mariusz Felisiak 2025-06-10 08:40:47 +02:00
parent cc5079730a
commit aec11dbb4c

View File

@ -1,7 +1,7 @@
import datetime
from django.core.exceptions import FieldDoesNotExist
from django.db.models import F
from django.db.models import F, IntegerField, Value
from django.db.models.functions import Coalesce, Lower
from django.db.utils import IntegrityError
from django.test import TestCase, override_settings, skipUnlessDBFeature
@ -294,7 +294,11 @@ class BulkUpdateTests(TestCase):
obj = JSONFieldNullable.objects.create(json_field={})
test_cases = [
("direct_none_assignment", None),
("expression_none_assignment", Coalesce(None, None)),
("value_none_assignment", Value(None)),
(
"expression_none_assignment",
Coalesce(None, None, output_field=IntegerField()),
),
]
for label, value in test_cases:
with self.subTest(case=label):