Fixed typo

Typo led to looking up all subnets on provider networks, which is
not expected when only provider subnets are requested.

JIRA:NCP-1580
This commit is contained in:
Amir Sadoughi
2015-10-27 21:37:50 +00:00
parent 334686a1dc
commit cec428047c

View File

@@ -752,7 +752,7 @@ def _subnet_find(context, limit, sorts, marker, page_reverse, fields,
query = query.filter(and_(not_(models.Subnet.id.in_(defaults)),
and_(*model_filters)))
elif not provider_query and filters and not invert_defaults:
query = query.filter(or_(models.Network.id.in_(defaults),
query = query.filter(or_(models.Subnet.id.in_(defaults),
and_(*model_filters)))
elif not invert_defaults: