mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-05 04:50:12 +03:00
Fixed a deprecation warning
This commit is contained in:
parent
bbe0df2916
commit
49174aa058
|
@ -1773,7 +1773,7 @@ class ModelField(Field):
|
|||
def to_internal_value(self, data):
|
||||
rel = get_remote_field(self.model_field, default=None)
|
||||
if rel is not None:
|
||||
return rel.to._meta.get_field(rel.field_name).to_python(data)
|
||||
return rel.model._meta.get_field(rel.field_name).to_python(data)
|
||||
return self.model_field.to_python(data)
|
||||
|
||||
def get_attribute(self, obj):
|
||||
|
|
Loading…
Reference in New Issue
Block a user