mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-17 21:18:16 -06:00
Clean up obsolete accommodations for 'required' widget attr
This commit is contained in:
parent
27d3453f12
commit
28ca4bcf9d
@ -738,7 +738,6 @@ class ServiceCreateForm(ServiceForm):
|
|||||||
# Fields which may be populated from a ServiceTemplate are not required
|
# Fields which may be populated from a ServiceTemplate are not required
|
||||||
for field in ('name', 'protocol', 'ports'):
|
for field in ('name', 'protocol', 'ports'):
|
||||||
self.fields[field].required = False
|
self.fields[field].required = False
|
||||||
del self.fields[field].widget.attrs['required']
|
|
||||||
|
|
||||||
def clean(self):
|
def clean(self):
|
||||||
super().clean()
|
super().clean()
|
||||||
|
@ -213,9 +213,7 @@ class UserForm(forms.ModelForm):
|
|||||||
|
|
||||||
# Password fields are optional for existing Users
|
# Password fields are optional for existing Users
|
||||||
self.fields['password'].required = False
|
self.fields['password'].required = False
|
||||||
self.fields['password'].widget.attrs.pop('required')
|
|
||||||
self.fields['confirm_password'].required = False
|
self.fields['confirm_password'].required = False
|
||||||
self.fields['confirm_password'].widget.attrs.pop('required')
|
|
||||||
|
|
||||||
def save(self, *args, **kwargs):
|
def save(self, *args, **kwargs):
|
||||||
instance = super().save(*args, **kwargs)
|
instance = super().save(*args, **kwargs)
|
||||||
|
Loading…
Reference in New Issue
Block a user