#16854 closed Bug (fixed)
AttributeError on syncdb
Reported by: | Nikolay Zakharov | Owned by: | nobody |
---|---|---|---|
Component: | Core (Management commands) | Version: | dev |
Severity: | Normal | Keywords: | syncdb management contenttypes |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
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.
Attachments (1)
Change History (5)
by , 13 years ago
Attachment: | patch_for_16854.diff added |
---|
comment:1 by , 13 years ago
This was marked as version 1.3, however I suspect that this is a regression on trunk, is that correct?
comment:2 by , 13 years ago
Triage Stage: | Unreviewed → Accepted |
---|---|
Version: | 1.3 → SVN |
It's pretty clear from looking at the relevant code that this is only on trunk, introduced in r16739. Accepting.
desh, if you are actually seeing it on 1.3 please note that.
comment:3 by , 13 years ago
That is correct, guys, it is only in the current SVN trunk and regression was introduced by commit at 09-09-2011.
Version was overlooked by me ('1.3' was default value).
Nice, seems that our company packaging bleeding edge trunk.
Initial patch against current git head (9323daf2)