mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fixes #7849: Fix exception when creating an FHRPGroup with an invalid IP address
This commit is contained in:
@@ -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({
|
||||
|
Reference in New Issue
Block a user