Closed Bug 926542 Opened 12 years ago Closed 11 years ago

[traceback] `./manage.py convert_to_south <appname>` blows up

Categories

(support.mozilla.org :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: rrosario, Unassigned)

Details

Something with the post_migrate signal we added for creating permissions. To reproduce: $ rm -rf kitsune/questions/migrations $ ./manage.py convert_to_south questions --delete-ghost-migrations Creating migrations directory at '/Users/rlr/dev/kitsune/kitsune/questions/migrations'... Creating __init__.py in '/Users/rlr/dev/kitsune/kitsune/questions/migrations'... + Added model questions.Question + Added M2M table for products on questions.Question + Added M2M table for topics on questions.Question + Added model questions.QuestionMetaData + Added unique constraint for ['question', 'name'] on questions.QuestionMetaData + Added model questions.QuestionVisits + Added model questions.Answer + Added model questions.QuestionVote + Added model questions.AnswerVote + Added model questions.VoteMetadata Created 0001_initial.py. You can now apply this migration with: ./manage.py migrate questions - Soft matched migration 0001 to 0001_initial. Running migrations for questions: - Nothing to migrate. - Loading initial data for questions. Installed 0 object(s) from 0 fixture(s) Traceback (most recent call last): File "./manage.py", line 47, in <module> execute_manager(settings) File "/Users/rlr/dev/kitsune/vendor/src/django/django/core/management/__init__.py", line 459, in execute_manager utility.execute() File "/Users/rlr/dev/kitsune/vendor/src/django/django/core/management/__init__.py", line 382, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/Users/rlr/dev/kitsune/vendor/src/django/django/core/management/base.py", line 196, in run_from_argv self.execute(*args, **options.__dict__) File "/Users/rlr/dev/kitsune/vendor/src/django/django/core/management/base.py", line 232, in execute output = self.handle(*args, **options) File "/Users/rlr/dev/kitsune/vendor/packages/South/south/management/commands/convert_to_south.py", line 89, in handle delete_ghosts=options.get("delete_ghosts", False), File "/Users/rlr/dev/kitsune/vendor/src/django/django/core/management/__init__.py", line 150, in call_command return klass.execute(*args, **defaults) File "/Users/rlr/dev/kitsune/vendor/src/django/django/core/management/base.py", line 232, in execute output = self.handle(*args, **options) File "/Users/rlr/dev/kitsune/vendor/packages/South/south/management/commands/migrate.py", line 111, in handle ignore_ghosts = ignore_ghosts, File "/Users/rlr/dev/kitsune/vendor/packages/South/south/migration/__init__.py", line 235, in migrate_app post_migrate.send(None, app=app_label) File "/Users/rlr/dev/kitsune/vendor/src/django/django/dispatch/dispatcher.py", line 172, in send response = receiver(signal=self, sender=sender, **named) File "/Users/rlr/dev/kitsune/kitsune/sumo/__init__.py", line 24, in update_permissions_after_migration get_app(app), get_models(), 2 if settings.DEBUG else 0) File "/Users/rlr/dev/kitsune/vendor/src/django/django/contrib/auth/management/__init__.py", line 35, in create_permissions ctype = ContentType.objects.get_for_model(klass) File "/Users/rlr/dev/kitsune/vendor/src/django/django/contrib/contenttypes/models.py", line 44, in get_for_model self._add_to_cache(self.db, ct) File "/Users/rlr/dev/kitsune/vendor/src/django/django/contrib/contenttypes/models.py", line 116, in _add_to_cache key = (model._meta.app_label, model._meta.object_name.lower()) AttributeError: 'NoneType' object has no attribute '_meta'
The initial migration is actually created successfully and works. This is just the signal handler that blows up once and you can just ignore it. So, Meh.
When we switch to Django 1.7 and thus ditch South in the very very near future, then this becomes a non-issue. I'm going to close this as WONTFIX.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.