Merge "Eager fetch stack tags with a subqueryload"

This commit is contained in:
Jenkins 2016-05-15 22:47:23 +00:00 committed by Gerrit Code Review
commit 7bb9892b89
1 changed files with 1 additions and 0 deletions

View File

@ -442,6 +442,7 @@ def _query_stack_get_all(context, tenant_safe=True, show_deleted=False,
if tenant_safe:
query = query.filter_by(tenant=context.tenant_id)
query = query.options(orm.subqueryload("tags"))
if tags:
for tag in tags:
tag_alias = orm_aliased(models.StackTag)