Commit 316c374b by Tom Christie

Merge pull request #3635 from martinhill/issue_3634

Relation fields no to_fields attribute attribute break serializer
parents 4eef2ea2 ff36cbe4
......@@ -92,7 +92,7 @@ def _get_fields(opts):
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):
......
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