Mon Jan 29 19:44:48 GMT 2007 Torne <torne@wolfpuppy.org.uk>
* Correct behaviour of min_num_in_admin on new objects
diff -rN -u old-dev/django/db/models/related.py new-dev/django/db/models/related.py
old
|
new
|
|
68 | 68 | # object |
69 | 69 | return [attr] |
70 | 70 | else: |
71 | | return [None] * self.field.rel.num_in_admin |
| 71 | if self.field.rel.min_num_in_admin: |
| 72 | return [None] * max(self.field.rel.num_in_admin, self.field.rel.min_num_in_admin) |
| 73 | else: |
| 74 | return [None] * self.field.rel.num_in_admin |
72 | 75 | |
73 | 76 | def get_db_prep_lookup(self, lookup_type, value): |
74 | 77 | # Defer to the actual field definition for db prep |