Commit 15f797fd by Xavier Ordoquy

Owned by import *

parent 857185cf
...@@ -12,7 +12,7 @@ response content is handled by parsers and renderers. ...@@ -12,7 +12,7 @@ response content is handled by parsers and renderers.
""" """
from __future__ import unicode_literals from __future__ import unicode_literals
from django.db import models from django.db import models
from django.db.models.fields import FieldDoesNotExist, Field from django.db.models.fields import FieldDoesNotExist, Field as DjangoField
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from rest_framework.compat import unicode_to_repr from rest_framework.compat import unicode_to_repr
from rest_framework.utils import model_meta from rest_framework.utils import model_meta
...@@ -939,7 +939,7 @@ class ModelSerializer(Serializer): ...@@ -939,7 +939,7 @@ class ModelSerializer(Serializer):
except FieldDoesNotExist: except FieldDoesNotExist:
continue continue
if not isinstance(model_field, Field): if not isinstance(model_field, DjangoField):
continue continue
# Include each of the `unique_for_*` field names. # Include each of the `unique_for_*` field names.
......
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