storage in groupconfig

This commit is contained in:
Emmanuel Garette 2020-02-18 22:10:33 +01:00
parent 6b33bddbac
commit ad6ed0a648

View file

@ -700,8 +700,7 @@ class TiramisuConfig(TiramisuHelp):
config, config,
storage=storage) storage=storage)
if isinstance(config, KernelGroupConfig): if isinstance(config, KernelGroupConfig):
return await GroupConfig(config, return await GroupConfig(config)
storage=storage)
raise Exception(_('unknown config type {}').format(type(config))) raise Exception(_('unknown config type {}').format(type(config)))
async def _reset_config_properties(self, async def _reset_config_properties(self,
@ -1481,9 +1480,13 @@ class _TiramisuContextGroupConfig(TiramisuConfig):
config = self._config_bag.context config = self._config_bag.context
for spath in spaths: for spath in spaths:
config = config.getconfig(spath) config = config.getconfig(spath)
if isinstance(config, KernelGroupConfig):
return self._return_config(config,
None)
return self._return_config(config, return self._return_config(config,
config._storage) config._storage)
async def copy(self, async def copy(self,
session_id=None, session_id=None,
storage=None): storage=None):
@ -1501,7 +1504,7 @@ class _TiramisuContextGroupConfig(TiramisuConfig):
storage=None, storage=None,
metaconfig_prefix=None): metaconfig_prefix=None):
if storage is None: if storage is None:
storage = self._config_bag.config._storage storage = self._config_bag.context._storage
async with self._config_bag.context.getconnection() as connection: async with self._config_bag.context.getconnection() as connection:
config = await self._config_bag.context.duplicate(connection, config = await self._config_bag.context.duplicate(connection,
session_id, session_id,