Fixed bug in [2531]. Thanks, Ned

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2533 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2006-03-20 01:04:09 +00:00
parent 33c4e307f2
commit 401b83f172
1 changed files with 2 additions and 2 deletions

View File

@ -205,13 +205,13 @@ class RelatedObject(object):
change = count - len(list) change = count - len(list)
if change > 0: if change > 0:
return list + [None] * len(change) return list + [None] * change
if change < 0: if change < 0:
return list[:change] return list[:change]
else: # Just right else: # Just right
return list return list
else: else:
return [None] * len(self.field.rel.num_in_admin) return [None] * self.field.rel.num_in_admin
def editable_fields(self): def editable_fields(self):
"Get the fields in this class that should be edited inline." "Get the fields in this class that should be edited inline."