mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-13 16:47:34 -06:00
Fixes: #19275 - Make type choice for interfaces non-required
This commit is contained in:
parent
d2e74e9d50
commit
f0f6c7a6a0
@ -200,6 +200,8 @@ def form_from_model(model, fields):
|
||||
form_fields = fields_for_model(model, fields=fields)
|
||||
for field in form_fields.values():
|
||||
field.required = False
|
||||
if field.widget and field.widget.is_required:
|
||||
field.widget.is_required = False
|
||||
|
||||
return type('FormFromModel', (forms.Form,), form_fields)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user