1
0
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:
Thomas Stephenson
2015-04-26 16:30:46 +10:00
committed by Tim Graham
parent 0ffa3943fb
commit 035b0fa60d
11 changed files with 31 additions and 19 deletions

View File

@@ -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()