magic-removal: Fixed old-style DB API call in db.models.manipulators
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2262 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
3c73a0e8d6
commit
6becd68eef
|
@ -154,7 +154,7 @@ class AutomaticManipulator(forms.Manipulator):
|
||||||
if self.change:
|
if self.change:
|
||||||
if rel_new_data[related.opts.pk.name][0]:
|
if rel_new_data[related.opts.pk.name][0]:
|
||||||
try:
|
try:
|
||||||
old_rel_obj = getattr(self.original_object, 'get_%s' % related.OLD_get_accessor_name() )(**{'%s__exact' % related.opts.pk.name: rel_new_data[related.opts.pk.attname][0]})
|
old_rel_obj = getattr(self.original_object, related.get_accessor_name()).get(**{'%s__exact' % related.opts.pk.name: rel_new_data[related.opts.pk.attname][0]})
|
||||||
except ObjectDoesNotExist:
|
except ObjectDoesNotExist:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue