1
1
mirror of https://github.com/encode/django-rest-framework.git synced 2025-07-29 01:20:02 +03:00

fix for issue

This commit is contained in:
Martin Hill 2015-11-14 17:00:07 -05:00
parent 4eef2ea21e
commit e475464945

View File

@ -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 field.to_fields[0] if hasattr(field, 'to_fields') else None
def _get_forward_relationships(opts):