Commit 3ba235a3 authored by James Bennett's avatar James Bennett
Browse files

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
parent e5437af8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -237,7 +237,7 @@ class ChangeList(object):
                    qs = qs.distinct()
                    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)

        return qs