From 3e956befb40f36f48da78f311467dff9ba3dbf8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sun, 24 Feb 2019 15:16:21 +0100 Subject: [PATCH] hobo: give newly created cubes a slug (#30859) --- bijoe/hobo_agent/management/commands/hobo_deploy.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bijoe/hobo_agent/management/commands/hobo_deploy.py b/bijoe/hobo_agent/management/commands/hobo_deploy.py index d566e77..045364e 100644 --- a/bijoe/hobo_agent/management/commands/hobo_deploy.py +++ b/bijoe/hobo_agent/management/commands/hobo_deploy.py @@ -36,6 +36,8 @@ class Command(hobo_deploy.Command): config = ConfigParser.ConfigParser() config.read(ini_file) + new = not(os.path.exists(ini_file)) + if not os.path.exists(schemas_path): os.mkdir(schemas_path) if not config.has_section('wcs-olap'): @@ -79,5 +81,7 @@ class Command(hobo_deploy.Command): config.set(base_url, 'key', key) config.set(base_url, 'schema', schema) config.set(base_url, 'cubes_label', service.get('title')) + if new: + config.set(base_url, 'cubes_slug', service.get('slug')) with open(ini_file, 'w') as f: config.write(f)