changed datefield to match code layout of datetime and time changes

This commit is contained in:
mjparker777 2015-12-17 12:21:44 -07:00
parent f3d5e1482b
commit d9c360845d

View File

@ -1121,11 +1121,11 @@ class DateField(Field):
self.fail('invalid', format=humanized_format)
def to_representation(self, value):
output_format = getattr(self, 'format', api_settings.DATE_FORMAT)
if not value:
return None
output_format = getattr(self, 'format', api_settings.DATE_FORMAT)
if output_format is None:
return value