Merge "Improve AddressScope.get_bound_tenant_ids method"

This commit is contained in:
Zuul 2021-06-07 14:13:42 +00:00 committed by Gerrit Code Review
commit 6a7b52a2c8
1 changed files with 2 additions and 3 deletions

View File

@ -71,6 +71,5 @@ class AddressScope(rbac_db.NeutronRbacObject):
@classmethod
def get_bound_tenant_ids(cls, context, obj_id):
snp_objs = subnetpool.SubnetPool.get_objects(
context, address_scope_id=obj_id
)
return {snp.project_id for snp in snp_objs}
context, address_scope_id=obj_id, fields=['project_id'])
return {snp['project_id'] for snp in snp_objs}