Fixed #16854 -- corrected an AttributeError coming from the contenttypes post-syncdb hook. Thanks to desh for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16832 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Alex Gaynor 2011-09-15 23:55:30 +00:00
parent ce48e8e940
commit 608548baa2
1 changed files with 4 additions and 1 deletions

View File

@ -44,7 +44,10 @@ def update_contenttypes(app, created_models, verbosity=2, **kwargs):
# Confirm that the content type is stale before deletion.
if to_remove:
if kwargs.get('interactive', False):
content_type_display = '\n'.join([' %s | %s' % (ct.app_label, ct.model) for ct in content_types])
content_type_display = '\n'.join([
' %s | %s' % (ct.app_label, ct.model)
for ct in to_remove
])
ok_to_delete = raw_input("""The following content types are stale and need to be deleted:
%s