mirror of https://github.com/django/django.git
Fixed #423 -- Fixed bug in ForeignKey admin filters. Thanks, jkocherhans
git-svn-id: http://code.djangoproject.com/svn/django/trunk@569 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
df3564dace
commit
b77114caaa
|
@ -196,11 +196,10 @@ def change_list(request, app_label, module_name):
|
|||
# Many-to-many or many-to-one filter.
|
||||
if f.rel:
|
||||
if isinstance(f, meta.ManyToManyField):
|
||||
lookup_kwarg = '%s__id__exact' % f.name
|
||||
lookup_title = f.rel.to.verbose_name
|
||||
else:
|
||||
lookup_kwarg = '%s__exact' % f.name
|
||||
lookup_title = f.verbose_name
|
||||
lookup_kwarg = '%s__id__exact' % f.name
|
||||
lookup_val = request.GET.get(lookup_kwarg, None)
|
||||
lookup_choices = f.rel.to.get_model_module().get_list()
|
||||
if len(lookup_choices) > 1:
|
||||
|
|
Loading…
Reference in New Issue