From 3a5335f09f58439f8e3c0bddbed8e4c7eeb32482 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Thu, 25 Sep 2014 13:12:02 +0100 Subject: [PATCH] Fix syntax error --- rest_framework/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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):