Browse Source

HOT-FIX: permite alteração numero protocolo (#2616)

pull/2618/head
Victor Fabre 6 years ago
committed by GitHub
parent
commit
517444bee4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      sapl/materia/forms.py

2
sapl/materia/forms.py

@ -204,7 +204,7 @@ class MateriaLegislativaForm(FileFieldCheckMixin, ModelForm):
widget=forms.HiddenInput())
self.fields['autor'] = forms.CharField(required=False,
widget=forms.HiddenInput())
if kwargs['instance'].numero_protocolo:
if kwargs['instance'].numero_protocolo and Protocolo.objects.filter(numero=kwargs['instance'].numero_protocolo, ano=kwargs['instance'].ano).exists():
self.fields['numero_protocolo'].widget.attrs['readonly'] = True
def clean(self):

Loading…
Cancel
Save