Merge pull request #3635 from martinhill/issue_3634

Relation fields no to_fields attribute attribute break serializer
This commit is contained in:
Tom Christie 2015-11-16 16:20:38 +00:00
commit 316c374b02

View File

@ -92,7 +92,7 @@ def _get_fields(opts):
def _get_to_field(field): def _get_to_field(field):
return field.to_fields[0] if field.to_fields else None return getattr(field, 'to_fields', None) and field.to_fields[0]
def _get_forward_relationships(opts): def _get_forward_relationships(opts):