Merge "Ensure group exists on updates"

This commit is contained in:
Jenkins 2015-09-11 17:32:51 +00:00 committed by Gerrit Code Review
commit 6d015bb3da

View File

@ -126,6 +126,9 @@ class PoolsController(base.PoolsBase):
if 'options' in fields:
fields['options'] = utils.json_encode(fields['options'])
if fields.get('group') is not None:
self._ensure_group_exists(fields.get('group'))
stmt = sa.sql.update(tables.Pools).where(
tables.Pools.c.name == name).values(**fields)