Checks if net_dns is None and returns so that we don't attempt to load

None objects

Change-Id: I2542fa2a77fc7d0689018564b9e83174b968e5fc
Closes-Bug: #1696889
(cherry picked from commit ed27436c06)
This commit is contained in:
Daniel Russell 2017-06-09 11:50:15 +10:00 committed by Ihar Hrachyshka
parent 7b67e63e97
commit 87e32ebf42
1 changed files with 2 additions and 0 deletions

View File

@ -252,4 +252,6 @@ class NetworkDNSDomain(base.NeutronDbObject):
models_v2.Port, cls.db_model.network_id ==
models_v2.Port.network_id).filter_by(
id=port_id).one_or_none()
if net_dns is None:
return None
return super(NetworkDNSDomain, cls)._load_object(context, net_dns)