mirror of
https://github.com/netbox-community/netbox.git
synced 2026-04-06 00:32:08 +02:00
Fixes: #19275 - Make type choice for interfaces non-required
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user