mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Refs #36419 -- Fixed BulkUpdateTests.test_json_field_sql_null() crash on Oracle.
Follow up to c1fa3fdd04.
			
			
This commit is contained in:
		| @@ -3,7 +3,7 @@ from math import ceil | ||||
|  | ||||
| from django.core.exceptions import FieldDoesNotExist | ||||
| from django.db import connection | ||||
| 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 | ||||
| @@ -305,7 +305,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): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user