Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
to_field is rel.field_name at <1.6. love pdb and pip!
  • Loading branch information
Harper04 committed Jan 20, 2015
commit a496c523a453ec80001073b95b3e24d8c5ce12d7
2 changes: 1 addition & 1 deletion rest_framework/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def get_to_field(field):
return field.to_fields[0] if len(field.to_fields) else None
else:
def get_to_field(field):
return field.field_name
return field.rel.field_name


# URLValidator only accepts `message` in 1.6+
Expand Down