magic-removal: Fixed _set_core_filter() call in db.models.fields.related
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2174 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
4d3763123a
commit
b3e9732eff
|
@ -114,9 +114,9 @@ class ManyRelatedObjectsDescriptor(object):
|
|||
rel_field = self.related.field
|
||||
|
||||
if self.rel_type == 'o2m':
|
||||
manager._set_core_filter(**{'%s__%s__exact' % (rel_field.name, rel_field.rel.to._meta.pk.name): getattr(instance, rel_field.rel.get_related_field().attname)})
|
||||
manager.core_filters.update({'%s__%s__exact' % (rel_field.name, rel_field.rel.to._meta.pk.name): getattr(instance, rel_field.rel.get_related_field().attname)})
|
||||
else:
|
||||
manager._set_core_filter(**{'%s__%s__exact' % (rel_field.name, instance_type._meta.pk.name): instance._get_pk_val()})
|
||||
manager.core_filters.update({'%s__%s__exact' % (rel_field.name, instance_type._meta.pk.name): instance._get_pk_val()})
|
||||
|
||||
# Prepare the manager.
|
||||
# TODO: Fix this hack?
|
||||
|
|
Loading…
Reference in New Issue