summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-06-16 02:16:28 +0000
committerGerrit Code Review <review@openstack.org>2017-06-16 02:16:28 +0000
commit609d4634737daaf4ae4692f0cbe53b7317b2014d (patch)
treebc5e3bfc5c4e8f787d7e47b339b0dcdac5febb20
parent22f32a805276b5941c11a25dbfa22df44def029d (diff)
parent87e32ebf4224b8a5df5bf6ba2ad2360393a374fb (diff)
Merge "Checks if net_dns is None and returns so that we don't attempt to load None objects" into stable/ocata
-rw-r--r--neutron/objects/network.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/neutron/objects/network.py b/neutron/objects/network.py
index e98d79c..b236fb8 100644
--- a/neutron/objects/network.py
+++ b/neutron/objects/network.py
@@ -252,4 +252,6 @@ class NetworkDNSDomain(base.NeutronDbObject):
252 models_v2.Port, cls.db_model.network_id == 252 models_v2.Port, cls.db_model.network_id ==
253 models_v2.Port.network_id).filter_by( 253 models_v2.Port.network_id).filter_by(
254 id=port_id).one_or_none() 254 id=port_id).one_or_none()
255 if net_dns is None:
256 return None
255 return super(NetworkDNSDomain, cls)._load_object(context, net_dns) 257 return super(NetworkDNSDomain, cls)._load_object(context, net_dns)