summaryrefslogtreecommitdiff
path: root/tests/regressiontests
diff options
context:
space:
mode:
authorKaren Tracey <kmtracey@gmail.com>2010-03-08 18:32:24 +0000
committerKaren Tracey <kmtracey@gmail.com>2010-03-08 18:32:24 +0000
commitf2bc4dd0a9e4676f77d4a1c0ddb5e836750f966c (patch)
tree5c948b218812a0d599721a6011918f57686c5136 /tests/regressiontests
parentfa3b4a47ef1220746e394acf9077b9a8f24c8a04 (diff)
Fixed #12024: Changed admin code to avoid raising an exception when a field listed
in raw_id_fields has limit_choices_to specified as a Q object. Tweaked a test to trigger the condition and verify the fix. Finally, documented that limit_choices_to specified as a Q object has no effect on the choices available for fields listed in raw_id_fields, and removed another incorrect note that claimed limit_choices_to had no effect on inlines in the admin. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12728 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests')
-rw-r--r--tests/regressiontests/admin_widgets/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/regressiontests/admin_widgets/models.py b/tests/regressiontests/admin_widgets/models.py
index ebf93d4b75..5632548414 100644
--- a/tests/regressiontests/admin_widgets/models.py
+++ b/tests/regressiontests/admin_widgets/models.py
@@ -49,7 +49,7 @@ class Inventory(models.Model):
return self.name
class Event(models.Model):
- band = models.ForeignKey(Band)
+ band = models.ForeignKey(Band, limit_choices_to=models.Q(pk__gt=0))
start_date = models.DateField(blank=True, null=True)
start_time = models.TimeField(blank=True, null=True)
description = models.TextField(blank=True)