From 9fe02e6b65bf6adb9f2bcb07e19e3bfbb5f918af Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Thu, 6 Oct 2005 14:43:07 +0000 Subject: [PATCH] Made raw_id_admin work with non-integer primary keys git-svn-id: http://code.djangoproject.com/svn/django/trunk@790 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/core/meta/fields.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/django/core/meta/fields.py b/django/core/meta/fields.py index 3e5cca169d..b13518c503 100644 --- a/django/core/meta/fields.py +++ b/django/core/meta/fields.py @@ -596,7 +596,10 @@ class ForeignKey(Field): Field.__init__(self, **kwargs) def get_manipulator_field_objs(self): - return [formfields.IntegerField] + if self.rel.raw_id_admin: + return self.rel.get_related_field().get_manipulator_field_objs() + else: + return [formfields.IntegerField] class ManyToManyField(Field): def __init__(self, to, **kwargs):