Skip to content

Commit 760268a

Browse files
thierrybaCarlton Gibson
authored andcommitted
Fixed a deprecation warning (#5058)
1 parent 2969040 commit 760268a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rest_framework/fields.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1831,7 +1831,7 @@ def __init__(self, model_field, **kwargs):
18311831
def to_internal_value(self, data):
18321832
rel = get_remote_field(self.model_field, default=None)
18331833
if rel is not None:
1834-
return rel.to._meta.get_field(rel.field_name).to_python(data)
1834+
return rel.model._meta.get_field(rel.field_name).to_python(data)
18351835
return self.model_field.to_python(data)
18361836

18371837
def get_attribute(self, obj):

0 commit comments

Comments
 (0)