OneToOne filtering should only apply in a popup selection from the related model.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9507 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
James Bennett 2008-11-20 19:01:40 +00:00
parent e5437af89a
commit 3ba235a348
1 changed files with 1 additions and 1 deletions

View File

@ -237,7 +237,7 @@ class ChangeList(object):
qs = qs.distinct() qs = qs.distinct()
break break
if self.opts.one_to_one_field: if self.is_popup and self.opts.one_to_one_field:
qs = qs.complex_filter(self.opts.one_to_one_field.rel.limit_choices_to) qs = qs.complex_filter(self.opts.one_to_one_field.rel.limit_choices_to)
return qs return qs