#16854: AttributeError on syncdb
-------------------------------------+-------------------------------------
Reporter: desh | Owner: nobody
Type: Bug | Status: new
Milestone: | Component: Core (Management
Version: 1.3 | commands)
Keywords: syncdb management | Severity: Normal
contenttypes | Triage Stage: Unreviewed
Has patch: 1 | Easy pickings: 1
UI/UX: 0 |
-------------------------------------+-------------------------------------
When one have stale content types and trying to do syncdb, following error
occurs:
{{{
Syncing...
Creating tables ...
Traceback (most recent call last):
File "./manage.py", line 9, in <module>
execute_manager(settings)
... traceback
File "/usr/lib/python2.6/dist-
packages/django/contrib/contenttypes/management.py", line 47, in
update_contenttypes
content_type_display = '\n'.join([' %s | %s' % (ct.app_label,
ct.model) for ct in content_types])
AttributeError: 'unicode' object has no attribute 'app_label'
}}}
This is because of type mismatch in list comprehension: content_types was
list of objects, but now it is a dict with app_labels as keys and models
as values.
--
Ticket URL: <https://code.djangoproject.com/ticket/16854>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.