mirror of
https://github.com/django/django.git
synced 2025-10-28 16:16:12 +00:00
Fixed #24716 -- Deprecated Field._get_val_from_obj()
The method duplicates the functionality of Field.value_from_object() and has the additional downside of being a privately named public API method.
This commit is contained in:
committed by
Tim Graham
parent
0ffa3943fb
commit
035b0fa60d
@@ -141,7 +141,7 @@ class TeamField(models.CharField):
|
||||
return Team(value)
|
||||
|
||||
def value_to_string(self, obj):
|
||||
return self._get_val_from_obj(obj).to_string()
|
||||
return self.value_from_object(obj).to_string()
|
||||
|
||||
def deconstruct(self):
|
||||
name, path, args, kwargs = super(TeamField, self).deconstruct()
|
||||
|
||||
Reference in New Issue
Block a user