hobo: give newly created cubes a slug (#30859)

This commit is contained in:
Frédéric Péters 2019-02-24 15:16:21 +01:00
parent a7af5f44a8
commit 3e956befb4
1 changed files with 4 additions and 0 deletions

View File

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