hobo: set theme if undefined (#10441)

This commit is contained in:
Frédéric Péters 2016-08-31 10:33:41 +02:00
parent fffb11dc6b
commit e3533f2706
2 changed files with 4 additions and 0 deletions

View File

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

View File

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