mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-22 03:56:53 -06:00
Fixes #7849: Fix exception when creating an FHRPGroup with an invalid IP address
This commit is contained in:
parent
500f213c6b
commit
6f7fbf7686
@ -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
|
||||
|
||||
---
|
||||
|
||||
|
@ -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({
|
||||
|
Loading…
Reference in New Issue
Block a user