Fix instance creation breaking due to hidden fields
All checks were successful
Tests / test (push) Successful in 26s
All checks were successful
Tests / test (push) Successful in 26s
This commit is contained in:
parent
2beae209cd
commit
68f9de15fc
1 changed files with 1 additions and 0 deletions
|
|
@ -218,6 +218,7 @@ class CrdModelFormMixin:
|
|||
name.startswith(f) for f in self.HIDDEN_FIELDS
|
||||
):
|
||||
field.widget = forms.HiddenInput()
|
||||
field.required = False
|
||||
|
||||
if self.instance and self.instance.pk:
|
||||
self.fields["name"].disabled = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue