Skip to content

Commit e56f0a9

Browse files
committed
Merge pull request #2441 from linovia/bugfix/2425
Support for Django 1.8a1
2 parents 0b91714 + 15f797f commit e56f0a9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

rest_framework/serializers.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"""
1313
from __future__ import unicode_literals
1414
from django.db import models
15-
from django.db.models.fields import FieldDoesNotExist
15+
from django.db.models.fields import FieldDoesNotExist, Field as DjangoField
1616
from django.utils.translation import ugettext_lazy as _
1717
from rest_framework.compat import unicode_to_repr
1818
from rest_framework.utils import model_meta
@@ -939,6 +939,9 @@ def get_fields(self):
939939
except FieldDoesNotExist:
940940
continue
941941

942+
if not isinstance(model_field, DjangoField):
943+
continue
944+
942945
# Include each of the `unique_for_*` field names.
943946
unique_constraint_names |= set([
944947
model_field.unique_for_date,

0 commit comments

Comments
 (0)