|
|
@@ -576,6 +576,15 @@ class FHRPGroupForm(BootstrapMixin, CustomFieldModelForm):
|
|
|
|
|
|
return instance
|
|
|
|
|
|
+ def clean(self):
|
|
|
+ ip_address = self.cleaned_data['ip_address']
|
|
|
+ ip_status = self.cleaned_data['ip_status']
|
|
|
+
|
|
|
+ if ip_address and not ip_status:
|
|
|
+ raise forms.ValidationError({
|
|
|
+ 'ip_status': "Status must be set when creating a new IP address."
|
|
|
+ })
|
|
|
+
|
|
|
|
|
|
class FHRPGroupAssignmentForm(BootstrapMixin, forms.ModelForm):
|
|
|
group = DynamicModelChoiceField(
|