Skip to content

Commit

Permalink
Fix the grantee group loading for source groups
Browse files Browse the repository at this point in the history
Fixes bug 859679.

(cherry picked from commit 114ca0b)

Change-Id: I92569ecc50fe3e9f17f633df03ee428587749a48
  • Loading branch information
vishvananda authored and markmc committed Oct 18, 2011
1 parent 44a2a64 commit 1f6b213
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions nova/db/sqlalchemy/api.py
Expand Up @@ -2828,14 +2828,13 @@ def security_group_rule_get_by_security_group(context, security_group_id,
result = session.query(models.SecurityGroupIngressRule).\
filter_by(deleted=can_read_deleted(context)).\
filter_by(parent_group_id=security_group_id).\
options(joinedload_all('grantee_group')).\
options(joinedload_all('grantee_group.instances')).\
all()
else:
# TODO(vish): Join to group and check for project_id
result = session.query(models.SecurityGroupIngressRule).\
filter_by(deleted=False).\
filter_by(parent_group_id=security_group_id).\
options(joinedload_all('grantee_group')).\
options(joinedload_all('grantee_group.instances')).\
all()
return result

Expand Down

0 comments on commit 1f6b213

Please sign in to comment.