mirror of
https://github.com/django/django.git
synced 2025-09-14 22:45:45 +00:00
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
This commit is contained in:
parent
fa3b4a47ef
commit
f2bc4dd0a9
3 changed files with 6 additions and 6 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue