Fixed #3394 -- Made min_num_in_admin be respected on new object creation. Patch
from torne-django@wolfpuppy.org.uk. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4500 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
5bed563edf
commit
ff46f0fbcf
3
AUTHORS
3
AUTHORS
|
@ -98,6 +98,7 @@ answer newbie questions, and generally made Django that much better:
|
||||||
Kieran Holland <http://www.kieranholland.com>
|
Kieran Holland <http://www.kieranholland.com>
|
||||||
Robert Rock Howard <http://djangomojo.com/>
|
Robert Rock Howard <http://djangomojo.com/>
|
||||||
Jason Huggins <http://www.jrandolph.com/blog/>
|
Jason Huggins <http://www.jrandolph.com/blog/>
|
||||||
|
Tom Insam
|
||||||
Baurzhan Ismagulov <ibr@radix50.net>
|
Baurzhan Ismagulov <ibr@radix50.net>
|
||||||
jcrasta@gmail.com
|
jcrasta@gmail.com
|
||||||
Michael Josephson <http://www.sdjournal.com/>
|
Michael Josephson <http://www.sdjournal.com/>
|
||||||
|
@ -168,8 +169,8 @@ answer newbie questions, and generally made Django that much better:
|
||||||
Aaron Swartz <http://www.aaronsw.com/>
|
Aaron Swartz <http://www.aaronsw.com/>
|
||||||
Tyson Tate <tyson@fallingbullets.com>
|
Tyson Tate <tyson@fallingbullets.com>
|
||||||
Tom Tobin
|
Tom Tobin
|
||||||
Tom Insam
|
|
||||||
Joe Topjian <http://joe.terrarum.net/geek/code/python/django/>
|
Joe Topjian <http://joe.terrarum.net/geek/code/python/django/>
|
||||||
|
torne-django@wolfpuppy.org.uk
|
||||||
Karen Tracey <graybark@bellsouth.net>
|
Karen Tracey <graybark@bellsouth.net>
|
||||||
Makoto Tsuyuki <mtsuyuki@gmail.com>
|
Makoto Tsuyuki <mtsuyuki@gmail.com>
|
||||||
Amit Upadhyay
|
Amit Upadhyay
|
||||||
|
|
|
@ -68,7 +68,10 @@ class RelatedObject(object):
|
||||||
# object
|
# object
|
||||||
return [attr]
|
return [attr]
|
||||||
else:
|
else:
|
||||||
return [None] * self.field.rel.num_in_admin
|
if self.field.rel.min_num_in_admin:
|
||||||
|
return [None] * max(self.field.rel.num_in_admin, self.field.rel.min_num_in_admin)
|
||||||
|
else:
|
||||||
|
return [None] * self.field.rel.num_in_admin
|
||||||
|
|
||||||
def get_db_prep_lookup(self, lookup_type, value):
|
def get_db_prep_lookup(self, lookup_type, value):
|
||||||
# Defer to the actual field definition for db prep
|
# Defer to the actual field definition for db prep
|
||||||
|
|
Loading…
Reference in New Issue