wcs: use new set_tenant_by_hostname() method (#54437)

This commit is contained in:
Frédéric Péters 2021-05-31 17:07:58 +02:00
parent c1a6da9736
commit e134d93b86
2 changed files with 2 additions and 4 deletions

View File

@ -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)

View File

@ -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()