Projet

Général

Profil

0001-migrate_schemas-PEP8ness-remove-useless-imports-3104.patch

Benjamin Dauvergne, 19 mars 2019 02:21

Télécharger (2,03 ko)

Voir les différences:

Subject: [PATCH 1/3] migrate_schemas: PEP8ness, remove useless imports
 (#31042)

 .../multitenant/management/commands/migrate_schemas.py | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
hobo/multitenant/management/commands/migrate_schemas.py
1 1
import django
2
from optparse import NO_DEFAULT
3 2

  
4 3
from django.apps import apps
5 4
from django.core.management.commands.migrate import Command as MigrateCommand
......
9 8
from django.conf import settings
10 9

  
11 10
from tenant_schemas.utils import get_public_schema_name, schema_exists
12
from hobo.multitenant.middleware import TenantMiddleware, TenantNotFound
11
from hobo.multitenant.middleware import TenantMiddleware
13 12
from hobo.multitenant.management.commands import SyncCommon
14 13

  
15 14

  
......
55 54
                loader.load_disk()
56 55
                recorder = MigrationRecorder(connection)
57 56
                applied_public_migrations = set(
58
                        [(app, migration) for app, migration
59
                         in recorder.applied_migrations()
60
                         if app in app_labels and
61
                            (app, migration) in loader.disk_migrations])
57
                    [(app, migration)
58
                     for app, migration in recorder.applied_migrations()
59
                     if app in app_labels and (app, migration) in loader.disk_migrations])
62 60
                for tenant in TenantMiddleware.get_tenants():
63 61
                    connection.set_schema(tenant.schema_name, include_public=False)
64 62
                    applied_migrations = self.get_applied_migrations(app_labels)
65
-