Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #3394 -- Made min_num_in_admin be respected on new object creat…

…ion. Patch

from torne-django@wolfpuppy.org.uk.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4500 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit ff46f0fbcf601be73a7f0866986aa96abac79e8e 1 parent 5bed563
@malcolmt malcolmt authored
Showing with 6 additions and 2 deletions.
  1. +2 −1  AUTHORS
  2. +4 −1 django/db/models/related.py
View
3  AUTHORS
@@ -98,6 +98,7 @@ answer newbie questions, and generally made Django that much better:
Kieran Holland <http://www.kieranholland.com>
Robert Rock Howard <http://djangomojo.com/>
Jason Huggins <http://www.jrandolph.com/blog/>
+ Tom Insam
Baurzhan Ismagulov <ibr@radix50.net>
jcrasta@gmail.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/>
Tyson Tate <tyson@fallingbullets.com>
Tom Tobin
- Tom Insam
Joe Topjian <http://joe.terrarum.net/geek/code/python/django/>
+ torne-django@wolfpuppy.org.uk
Karen Tracey <graybark@bellsouth.net>
Makoto Tsuyuki <mtsuyuki@gmail.com>
Amit Upadhyay
View
5 django/db/models/related.py
@@ -68,7 +68,10 @@ def get_list(self, parent_instance=None):
# object
return [attr]
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):
# Defer to the actual field definition for db prep
Please sign in to comment.
Something went wrong with that request. Please try again.