From e134da8a1ae694372710f61ee7df29338e4d0168 Mon Sep 17 00:00:00 2001 From: Luke Plant Date: Wed, 22 Mar 2006 19:05:43 +0000 Subject: [PATCH] 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 --- django/db/models/fields/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py index ceb96e6e81..07d9c14d5d 100644 --- a/django/db/models/fields/__init__.py +++ b/django/db/models/fields/__init__.py @@ -295,7 +295,7 @@ class Field(object): return first_choice + list(self.choices) rel_model = self.rel.to 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): if self.radio_admin: