diff --git a/rest_framework/fields.py b/rest_framework/fields.py index d855e6fdc..7beccbb71 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -635,7 +635,7 @@ class DateTimeField(Field): return value def to_internal_value(self, value): - if (isinstance(value, datetime.date) and not isinstance(value, datetime.datetime): + if isinstance(value, datetime.date) and not isinstance(value, datetime.datetime): self.fail('date') if isinstance(value, datetime.datetime):