Simplified two unnecessary list comprehensions in core/meta/__init__.py. Thanks, Ned Batchelder
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2531 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
426e7223fb
commit
33c4e307f2
|
@ -205,14 +205,13 @@ class RelatedObject(object):
|
|||
|
||||
change = count - len(list)
|
||||
if change > 0:
|
||||
return list + [None for _ in range(change)]
|
||||
return list + [None] * len(change)
|
||||
if change < 0:
|
||||
return list[:change]
|
||||
else: # Just right
|
||||
return list
|
||||
else:
|
||||
return [None for _ in range(self.field.rel.num_in_admin)]
|
||||
|
||||
return [None] * len(self.field.rel.num_in_admin)
|
||||
|
||||
def editable_fields(self):
|
||||
"Get the fields in this class that should be edited inline."
|
||||
|
|
Loading…
Reference in New Issue