mirror of
				https://github.com/django/django.git
				synced 2025-10-31 01:25:32 +00:00 
			
		
		
		
	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:
		| @@ -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." | ||||
|   | ||||
		Reference in New Issue
	
	Block a user