Merge "Filter subnet by segment ID or None"
This commit is contained in:
commit
8b7d0dcbef
@ -393,8 +393,7 @@ class Subnet(base.NeutronDbObject):
|
|||||||
if 1 < len(segment_ids):
|
if 1 < len(segment_ids):
|
||||||
raise segment_exc.FixedIpsSubnetsNotOnSameSegment()
|
raise segment_exc.FixedIpsSubnetsNotOnSameSegment()
|
||||||
|
|
||||||
segment_id = False if not segment_ids else segment_ids[0]
|
segment_id = None if not segment_ids else segment_ids[0]
|
||||||
|
|
||||||
return query.filter(cls.db_model.segment_id == segment_id)
|
return query.filter(cls.db_model.segment_id == segment_id)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
Loading…
Reference in New Issue
Block a user