diff --git a/docs/release-notes/version-3.1.md b/docs/release-notes/version-3.1.md index a8b1711c9..4c8379d48 100644 --- a/docs/release-notes/version-3.1.md +++ b/docs/release-notes/version-3.1.md @@ -13,6 +13,7 @@ * [#7757](https://github.com/netbox-community/netbox/issues/7757) - Fix 404 when assigning multiple contacts/FHRP groups in succession * [#7768](https://github.com/netbox-community/netbox/issues/7768) - Validate IP address status when creating a new FHRP group * [#7771](https://github.com/netbox-community/netbox/issues/7771) - Group assignment should be optional when creating contacts via REST API +* [#7849](https://github.com/netbox-community/netbox/issues/7849) - Fix exception when creating an FHRPGroup with an invalid IP address --- diff --git a/netbox/ipam/forms/models.py b/netbox/ipam/forms/models.py index eea3bb216..baa5e738a 100644 --- a/netbox/ipam/forms/models.py +++ b/netbox/ipam/forms/models.py @@ -587,8 +587,8 @@ class FHRPGroupForm(BootstrapMixin, CustomFieldModelForm): return instance def clean(self): - ip_address = self.cleaned_data['ip_address'] - ip_status = self.cleaned_data['ip_status'] + ip_address = self.cleaned_data.get('ip_address') + ip_status = self.cleaned_data.get('ip_status') if ip_address and not ip_status: raise forms.ValidationError({