Merge "Refactor 'if false do nothing' logic in l3 scheduler db"

This commit is contained in:
Jenkins 2014-07-14 19:15:25 +00:00 committed by Gerrit Code Review
commit c8b719940c
1 changed files with 1 additions and 3 deletions

View File

@ -163,9 +163,7 @@ class L3AgentSchedulerDbMixin(l3agentscheduler.L3AgentSchedulerPluginBase,
query = query.filter(
RouterL3AgentBinding.l3_agent_id == agent.id)
if not router_ids:
pass
else:
if router_ids:
query = query.filter(
RouterL3AgentBinding.router_id.in_(router_ids))
router_ids = [item[0] for item in query]