mirror of https://github.com/django/django.git
parent
7f8a924b45
commit
ef8a339dfb
|
@ -36,8 +36,6 @@ class AreaField(models.FloatField):
|
||||||
return getattr(value, self.area_att)
|
return getattr(value, self.area_att)
|
||||||
|
|
||||||
def from_db_value(self, value, expression, connection, context):
|
def from_db_value(self, value, expression, connection, context):
|
||||||
if connection.features.interprets_empty_strings_as_nulls and value == '':
|
|
||||||
value = None
|
|
||||||
# If the database returns a Decimal, convert it to a float as expected
|
# If the database returns a Decimal, convert it to a float as expected
|
||||||
# by the Python geometric objects.
|
# by the Python geometric objects.
|
||||||
if isinstance(value, Decimal):
|
if isinstance(value, Decimal):
|
||||||
|
|
Loading…
Reference in New Issue