Merge "Gracefully handle fetch network fail in qos extend port"

This commit is contained in:
Zuul 2019-01-18 15:08:05 +00:00 committed by Gerrit Code Review
commit 8d9879b8c0
1 changed files with 1 additions and 1 deletions

View File

@ -99,7 +99,7 @@ class QoSPlugin(qos.QoSPluginBase):
if not qos_policy:
net = network_object.Network.get_object(
context.get_admin_context(), id=port_res['network_id'])
if net.qos_policy_id:
if net and net.qos_policy_id:
qos_policy = policy_object.QosPolicy.get_network_policy(
context.get_admin_context(), net.id)