Skip to content

Commit

Permalink
fix for issue #3634
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Hill committed Nov 14, 2015
1 parent 4eef2ea commit e475464
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rest_framework/utils/model_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit e475464

Please sign in to comment.