Merge pull request 'Fix instance creation breaking due to hidden fields' (#181) from 180-fix-instance-creation into main
All checks were successful
Build and Deploy Staging / build (push) Successful in 51s
Tests / test (push) Successful in 24s
Build and Deploy Staging / deploy (push) Successful in 10s

Reviewed-on: #181
This commit is contained in:
Tobias Kunze 2025-09-05 20:38:06 +00:00
commit 42fbd99c72

View file

@ -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