diff --git a/rest_framework_mongoengine/fields.py b/rest_framework_mongoengine/fields.py index 8d01860..cbca88f 100644 --- a/rest_framework_mongoengine/fields.py +++ b/rest_framework_mongoengine/fields.py @@ -445,6 +445,8 @@ def to_internal_value(self, value): self.fail('not_a_list', input_value=repr(value)) if len(value) != 2: self.fail('not_2d', input_value=repr(value)) + if value == [None, None]: + return value try: return [float(value[0]), float(value[1])] except ValueError: