Merge "ensure default security group exists when filter by project_id"

This commit is contained in:
Zuul 2020-05-05 21:01:17 +00:00 committed by Gerrit Code Review
commit 8c2c1ad9f6
1 changed files with 1 additions and 1 deletions

View File

@ -165,7 +165,7 @@ class SecurityGroupDbMixin(ext_sg.SecurityGroupPluginBase,
# GETS. TODO(arosen) context handling can probably be improved here.
filters = filters or {}
if not default_sg and context.tenant_id:
tenant_id = filters.get('tenant_id')
tenant_id = filters.get('project_id') or filters.get('tenant_id')
if tenant_id:
tenant_id = tenant_id[0]
else: