mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #29500 -- Fixed SQLite function crashes on null values.
Co-authored-by: Srinivas Reddy Thatiparthy <thatiparthysreenivas@gmail.com> Co-authored-by: Nick Pope <nick.pope@flightdataservices.com>
This commit is contained in:
committed by
Tim Graham
parent
76dfa834e7
commit
34d6bceec4
@@ -11,6 +11,11 @@ from ..models import DecimalModel, FloatModel, IntegerModel
|
||||
|
||||
class CeilTests(TestCase):
|
||||
|
||||
def test_null(self):
|
||||
IntegerModel.objects.create()
|
||||
obj = IntegerModel.objects.annotate(null_ceil=Ceil('normal')).first()
|
||||
self.assertIsNone(obj.null_ceil)
|
||||
|
||||
def test_decimal(self):
|
||||
DecimalModel.objects.create(n1=Decimal('12.9'), n2=Decimal('0.6'))
|
||||
obj = DecimalModel.objects.annotate(n1_ceil=Ceil('n1'), n2_ceil=Ceil('n2')).first()
|
||||
|
||||
Reference in New Issue
Block a user