diff options
| author | Tim Graham <timograham@gmail.com> | 2018-09-11 12:51:11 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-11 12:51:11 -0400 |
| commit | 32fbccab406b680bc0a0a8d39a9b95c3a08bbc5a (patch) | |
| tree | 1018f468ebc01dde26d078c4875af1ac6268aaa9 /django | |
| parent | a4d8e412e0295ac7d40bb87ee6e5f44649f97816 (diff) | |
Fixed #29749 -- Made the migrations loader ignore files starting with a tilde or underscore.
Regression in 29150d5da880ac1db15e47052330790cf1b802d2.
Diffstat (limited to 'django')
| -rw-r--r-- | django/db/migrations/loader.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/django/db/migrations/loader.py b/django/db/migrations/loader.py index 79de511860..dd0f37d135 100644 --- a/django/db/migrations/loader.py +++ b/django/db/migrations/loader.py @@ -97,7 +97,10 @@ class MigrationLoader: if was_loaded: reload(module) self.migrated_apps.add(app_config.label) - migration_names = {name for _, name, is_pkg in pkgutil.iter_modules(module.__path__) if not is_pkg} + migration_names = { + name for _, name, is_pkg in pkgutil.iter_modules(module.__path__) + if not is_pkg and name[0] not in '_~' + } # Load migrations for migration_name in migration_names: migration_path = '%s.%s' % (module_name, migration_name) |
