Merged release v2.4.5

This commit is contained in:
Jeremy Stretch
2018-10-03 11:23:21 -04:00
38 changed files with 249 additions and 125 deletions

View File

@@ -587,7 +587,11 @@ class IPAddress(ChangeLoggedModel, CustomFieldModel):
if self.address:
# Enforce unique IP space (if applicable)
if (self.vrf is None and settings.ENFORCE_GLOBAL_UNIQUE) or (self.vrf and self.vrf.enforce_unique):
if self.role not in IPADDRESS_ROLES_NONUNIQUE and (
self.vrf is None and settings.ENFORCE_GLOBAL_UNIQUE
) or (
self.vrf and self.vrf.enforce_unique
):
duplicate_ips = self.get_duplicates()
if duplicate_ips:
raise ValidationError({