Ticket #338 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

Historicaly removed app raises django.core.exceptions.ImproperlyConfigured

Reported by: ales.zoulek@… Owned by: andrew
Priority: major Milestone: 0.7
Component: migrations Version: 0.7-pre
Keywords: Cc:


I'm using "trunk" version 617:b52d5e1e4b21 of south. And it seems there is a bug in ignoring missing applications.

./manage.py migrate

Traceback (most recent call last):
  File "./manage.py", line 21, in <module>
  File "/home/al3x/PYTHONPATH/django/core/management/__init__.py", line 438, in execute_manager
  File "/home/al3x/PYTHONPATH/django/core/management/__init__.py", line 379, in execute
  File "/home/al3x/PYTHONPATH/django/core/management/base.py", line 195, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/home/al3x/PYTHONPATH/django/core/management/base.py", line 222, in execute
    output = self.handle(*args, **options)
  File "/home/al3x/PYTHONPATH/south/management/commands/migrate.py", line 99, in handle
    database = database,
  File "/home/al3x/PYTHONPATH/south/migration/__init__.py", line 151, in migrate_app
    applied = check_migration_histories(applied)
  File "/home/al3x/PYTHONPATH/south/migration/__init__.py", line 66, in check_migration_histories
    for m in migrations:
  File "/home/al3x/PYTHONPATH/south/migration/__init__.py", line 65, in <genexpr>
    migrations = (h.get_migration() for h in histories)
  File "/home/al3x/PYTHONPATH/south/models.py", line 25, in get_migration
    return self.get_migrations().migration(self.migration)
  File "/home/al3x/PYTHONPATH/south/models.py", line 22, in get_migrations
    return Migrations(self.app_name)
  File "/home/al3x/PYTHONPATH/south/migration/base.py", line 60, in __call__
    self.instances[app_label] = super(MigrationsMetaclass, self).__call__(app_label_to_app_module(app_label), **kwds)
  File "/home/al3x/PYTHONPATH/south/migration/utils.py", line 41, in app_label_to_app_module
    app = models.get_app(app_label)
  File "/home/al3x/PYTHONPATH/django/db/models/loading.py", line 126, in get_app
    raise ImproperlyConfigured("App with label %s could not be found" % app_label)
django.core.exceptions.ImproperlyConfigured: App with label transactions could not be found

I think that check_migration_histories() shoudl call h.get_migration() in try/except block as well. (Patch attached.)


south_338_patch.diff (820 bytes) - added by ales.zoulek@… 6 years ago.

Change History

Changed 6 years ago by ales.zoulek@…


comment:1 Changed 6 years ago by andrew

  • Status changed from new to closed
  • Version set to 0.7-pre
  • Resolution set to fixed
  • Milestone set to 0.7

Applied in [bfbc4c55fa94].

Note: See TracTickets for help on using tickets.