Commit 94828f4d by Tom Christie

Merge pull request #629 from z4r/patch-1

Update rest_framework/serializers.py
parents 54096a19 85e63607
......@@ -469,7 +469,7 @@ class ModelSerializer(Serializer):
kwargs['required'] = False
kwargs['default'] = model_field.get_default()
if model_field.__class__ == models.TextField:
if issubclass(model_field.__class__, models.TextField):
kwargs['widget'] = widgets.Textarea
# TODO: TypedChoiceField?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment