From 94bfbef798a6c75c335f87495359d8ff9132d5a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Wed, 31 Aug 2016 10:33:41 +0200 Subject: [PATCH] hobo: set theme if undefined (#10441) --- tests/test_hobo.py | 1 + wcs/ctl/check_hobos.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/tests/test_hobo.py b/tests/test_hobo.py index b72bb34..55c326f 100644 --- a/tests/test_hobo.py +++ b/tests/test_hobo.py @@ -240,6 +240,7 @@ def test_update_configuration(): assert pub.cfg['misc']['sitename'] == 'Test wcs' assert pub.cfg['emails']['footer'] == 'Hello world.' assert pub.cfg['emails']['from'] == 'noreply@example.net' + assert pub.cfg['branding']['theme'] == 'publik' def test_update_profile(): profile = HOBO_JSON.get('profile') diff --git a/wcs/ctl/check_hobos.py b/wcs/ctl/check_hobos.py index b162c30..0914d53 100644 --- a/wcs/ctl/check_hobos.py +++ b/wcs/ctl/check_hobos.py @@ -139,6 +139,9 @@ class CmdCheckHobos(Command): if not pub.cfg.get('emails'): pub.cfg['emails'] = {} + if not pub.cfg.get('branding'): + pub.cfg['branding'] = {'theme': 'publik'} + variables = self.all_services.get('variables') or {} variables.update(service.get('variables') or {}) if variables.get('default_from_email'): -- 2.9.3