From e502f4079139ac19aecdd3cc0b674a0ddd4e9636 Mon Sep 17 00:00:00 2001 From: Serghei MIHAI Date: Sun, 25 Jan 2015 21:23:06 +0100 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(-) diff --git a/entrouvert/djommon/multitenant/management/commands/deploy.py b/entrouvert/djommon/multitenant/management/commands/deploy.py index 4c63acd..5c31fec 100644 --- a/entrouvert/djommon/multitenant/management/commands/deploy.py +++ b/entrouvert/djommon/multitenant/management/commands/deploy.py @@ -23,8 +23,9 @@ class Command(BaseCommand): call_command('create_tenant', hostname) tenant_name = TenantMiddleware.hostname2schema(hostname) - with tenant_context(tenant_name): - self.deploy_tenant(environment, service) + tenant = TenantMiddleware.get_tenant_by_hostname(tenant_name) + with tenant_context(tenant): + self.deploy_tenant(environment, service, options) - def deploy_tenant(self, options, environment, service): + def deploy_tenant(self, environment, service, options): pass -- 2.1.4