diff --git a/sapl/materia/forms.py b/sapl/materia/forms.py index 0e841504b..9a1e4eda7 100644 --- a/sapl/materia/forms.py +++ b/sapl/materia/forms.py @@ -202,7 +202,8 @@ class MateriaLegislativaForm(ModelForm): widget=forms.HiddenInput()) self.fields['autor'] = forms.CharField(required=False, widget=forms.HiddenInput()) - self.fields['numero_protocolo'].widget.attrs['readonly'] = True + if kwargs['instance'].numero_protocolo: + self.fields['numero_protocolo'].widget.attrs['readonly'] = True def clean(self): super(MateriaLegislativaForm, self).clean()