Merge "create_security_group: Expunge an object selectively"
This commit is contained in:
commit
e86dfc9272
@ -121,7 +121,8 @@ class SecurityGroupDbMixin(ext_sg.SecurityGroupPluginBase):
|
||||
# of the SG. It would add SG object to the session.
|
||||
# Expunge it to ensure the following get_object doesn't
|
||||
# use the instance.
|
||||
context.session.expunge_all()
|
||||
context.session.expunge(model_query.get_by_id(
|
||||
context, sg_models.SecurityGroup, sg.id))
|
||||
sg = sg_obj.SecurityGroup.get_object(context, id=sg.id)
|
||||
secgroup_dict = self._make_security_group_dict(sg)
|
||||
kwargs['security_group'] = secgroup_dict
|
||||
|
Loading…
x
Reference in New Issue
Block a user