Merge "Remove redundant `where` for forbidden traits"
This commit is contained in:
commit
94c8d253ec
|
@ -1447,7 +1447,10 @@ class ResourceProviderList(base.ObjectListBase, base.VersionedObject):
|
|||
return []
|
||||
if rp_ids:
|
||||
query = query.where(rp.c.id.in_(rp_ids))
|
||||
if forbidden_rp_ids:
|
||||
# forbidden providers, if found, are mutually exclusive with matching
|
||||
# providers above, so we only need to include this clause if we didn't
|
||||
# use the positive filter above.
|
||||
elif forbidden_rp_ids:
|
||||
query = query.where(~rp.c.id.in_(forbidden_rp_ids))
|
||||
|
||||
if not resources:
|
||||
|
|
Loading…
Reference in New Issue