From e134d93b86f4e25cec0071fe9024625c7467eea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Mon, 31 May 2021 17:07:58 +0200 Subject: [PATCH] wcs: use new set_tenant_by_hostname() method (#54437) --- wcs/has_role.py | 3 +-- wcs/imio_import_directory.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/wcs/has_role.py b/wcs/has_role.py index 677c0d7..115aced 100644 --- a/wcs/has_role.py +++ b/wcs/has_role.py @@ -15,8 +15,7 @@ class Cmd(Command): publisher.WcsPublisher.configure(self.config) publisher = publisher.WcsPublisher.create_publisher(register_tld_names=False) - publisher.app_dir = os.path.join(publisher.app_dir, sub_options.domain) - publisher.set_config() + publisher.set_tenant_by_hostname(sub_options.domain) for role in publisher.role_class.select(): if role.name == args[0]: sys.exit(0) diff --git a/wcs/imio_import_directory.py b/wcs/imio_import_directory.py index 0210b3e..6380ff6 100644 --- a/wcs/imio_import_directory.py +++ b/wcs/imio_import_directory.py @@ -27,8 +27,7 @@ class Cmd(Command): publisher.WcsPublisher.configure(self.config) publisher = publisher.WcsPublisher.create_publisher(register_tld_names=False) - publisher.app_dir = os.path.join(publisher.app_dir, sub_options.domain) - publisher.set_config() + publisher.set_tenant_by_hostname(sub_options.domain) self.directory = args[0] self.import_categories() self.import_datasources()