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