mirror of
https://github.com/django/django.git
synced 2025-07-05 10:19:20 +00:00
magic-removal: Fixed limit_choices_to functionality in m-r branch (bug introduced by a refactoring error AFAICS)
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2547 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
3da050e44e
commit
e134da8a1a
@ -295,7 +295,7 @@ class Field(object):
|
|||||||
return first_choice + list(self.choices)
|
return first_choice + list(self.choices)
|
||||||
rel_model = self.rel.to
|
rel_model = self.rel.to
|
||||||
return first_choice + [(x._get_pk_val(), str(x))
|
return first_choice + [(x._get_pk_val(), str(x))
|
||||||
for x in rel_model._default_manager.filter(**rel_model._meta.limit_choices_to)]
|
for x in rel_model._default_manager.filter(**self.rel.limit_choices_to)]
|
||||||
|
|
||||||
def get_choices_default(self):
|
def get_choices_default(self):
|
||||||
if self.radio_admin:
|
if self.radio_admin:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user