From 93deb1691eb27dc89135511fb0c10e077c8baca7 Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Mon, 11 Apr 2016 23:15:52 +0300 Subject: [PATCH] Fixed #26492 -- Fixed "maximum recursion depth exceeded" migrate error. A regression introduced in 0d3c616fbb2f49fa7ff6809e5a6777275352b35b; refs #26351. --- django/core/management/commands/migrate.py | 2 +- tests/migrations/test_commands.py | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/django/core/management/commands/migrate.py b/django/core/management/commands/migrate.py index 72538f45866..a8e9831cdab 100644 --- a/django/core/management/commands/migrate.py +++ b/django/core/management/commands/migrate.py @@ -59,7 +59,7 @@ class Command(BaseCommand): def _run_checks(self, **kwargs): issues = run_checks(tags=[Tags.database]) - issues.extend(super(Command, self).check(**kwargs)) + issues.extend(super(Command, self)._run_checks(**kwargs)) return issues def handle(self, *args, **options): diff --git a/tests/migrations/test_commands.py b/tests/migrations/test_commands.py index 9838ccf74fc..a6641dcf1e7 100644 --- a/tests/migrations/test_commands.py +++ b/tests/migrations/test_commands.py @@ -53,6 +53,16 @@ class MigrateTests(MigrationTestBase): self.assertTableNotExists("migrations_tribble") self.assertTableNotExists("migrations_book") + @override_settings(INSTALLED_APPS=[ + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'migrations.migrations_test_apps.migrated_app', + ]) + def test_migrate_with_system_checks(self): + out = six.StringIO() + call_command('migrate', skip_checks=False, no_color=True, stdout=out) + self.assertIn('Apply all migrations: migrated_app', out.getvalue()) + @override_settings(MIGRATION_MODULES={"migrations": "migrations.test_migrations_initial_false"}) def test_migrate_initial_false(self): """