mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fixes #7756: Fix AttributeError exception when editing an IP address assigned to a FHRPGroup
This commit is contained in:
@ -1,3 +1,11 @@
|
||||
## v3.1-beta2 (FUTURE)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* [#7756](https://github.com/netbox-community/netbox/issues/7756) - Fix AttributeError exception when editing an IP address assigned to a FHRPGroup
|
||||
|
||||
---
|
||||
|
||||
## v3.1-beta1 (2021-11-05)
|
||||
|
||||
!!! warning "PostgreSQL 10 Required"
|
||||
|
@ -444,8 +444,8 @@ class IPAddressForm(BootstrapMixin, TenancyForm, CustomFieldModelForm):
|
||||
|
||||
# Initialize primary_for_parent if IP address is already assigned
|
||||
if self.instance.pk and self.instance.assigned_object:
|
||||
parent = self.instance.assigned_object.parent_object
|
||||
if (
|
||||
parent = getattr(self.instance.assigned_object, 'parent_object', None)
|
||||
if parent and (
|
||||
self.instance.address.version == 4 and parent.primary_ip4_id == self.instance.pk or
|
||||
self.instance.address.version == 6 and parent.primary_ip6_id == self.instance.pk
|
||||
):
|
||||
|
Reference in New Issue
Block a user