Projet

Général

Profil

0001-tenant-object-passed-to-context-manager.patch

Serghei Mihai (congés, retour 15/05), 25 janvier 2015 21:30

Télécharger (1,25 ko)

Voir les différences:

Subject: [PATCH] tenant object passed to context manager. "deploy tenant"
 method should be called with three parameters

 entrouvert/djommon/multitenant/management/commands/deploy.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
entrouvert/djommon/multitenant/management/commands/deploy.py
23 23
        call_command('create_tenant', hostname)
24 24

  
25 25
        tenant_name = TenantMiddleware.hostname2schema(hostname)
26
        with tenant_context(tenant_name):
27
            self.deploy_tenant(environment, service)
26
        tenant = TenantMiddleware.get_tenant_by_hostname(tenant_name)
27
        with tenant_context(tenant):
28
            self.deploy_tenant(environment, service, options)
28 29

  
29
    def deploy_tenant(self, options, environment, service):
30
    def deploy_tenant(self, environment, service, options):
30 31
        pass
31
-