From 401b83f172d6f2b0da6c67282bd1d93159c61204 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Mon, 20 Mar 2006 01:04:09 +0000 Subject: [PATCH] Fixed bug in [2531]. Thanks, Ned git-svn-id: http://code.djangoproject.com/svn/django/trunk@2533 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/core/meta/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/core/meta/__init__.py b/django/core/meta/__init__.py index b709e56341..3de7c44b68 100644 --- a/django/core/meta/__init__.py +++ b/django/core/meta/__init__.py @@ -205,13 +205,13 @@ class RelatedObject(object): change = count - len(list) if change > 0: - return list + [None] * len(change) + return list + [None] * change if change < 0: return list[:change] else: # Just right return list else: - return [None] * len(self.field.rel.num_in_admin) + return [None] * self.field.rel.num_in_admin def editable_fields(self): "Get the fields in this class that should be edited inline."