diff --git a/rest_framework/fields.py b/rest_framework/fields.py index d9f61b280..35848b4ce 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -336,13 +336,13 @@ class ModelField(WritableField): raise ValueError("ModelField requires 'model_field' kwarg") self.min_length = kwargs.pop('min_length', - getattr(self.model_field, 'min_length', None)) + getattr(self.model_field, 'min_length', None)) self.max_length = kwargs.pop('max_length', - getattr(self.model_field, 'max_length', None)) + getattr(self.model_field, 'max_length', None)) self.min_value = kwargs.pop('min_value', - getattr(self.model_field, 'min_value', None)) + getattr(self.model_field, 'min_value', None)) self.max_value = kwargs.pop('max_value', - getattr(self.model_field, 'max_value', None)) + getattr(self.model_field, 'max_value', None)) super(ModelField, self).__init__(*args, **kwargs)