Skip to content

Commit 9003ffa

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "[qos] _validate_create_network_callback return in no network" into stable/2023.1
2 parents 7921328 + 4462c1a commit 9003ffa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

neutron/services/qos/qos_plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,9 +610,9 @@ def _validate_create_network_callback(self, resource, event, trigger,
610610
network_id = payload.resource_id
611611
network = network_object.Network.get_object(context, id=network_id)
612612

613-
policy_id = network.qos_policy_id
614-
if policy_id is None:
613+
if not network or not getattr(network, 'qos_policy_id', None):
615614
return
615+
policy_id = network.qos_policy_id
616616

617617
policy = policy_object.QosPolicy.get_object(
618618
context.elevated(), id=policy_id)

0 commit comments

Comments
 (0)