Browse Source

Adiciona uma das correções sugeridas

pull/1323/head
Eduardo Calil 9 years ago
parent
commit
1fe2cad362
  1. 4
      sapl/materia/forms.py
  2. 3
      sapl/materia/views.py

4
sapl/materia/forms.py

@ -1084,7 +1084,9 @@ class ProposicaoForm(forms.ModelForm):
texto_original = self.cleaned_data.get('texto_original', False)
if texto_original:
if texto_original.size > MAX_DOC_UPLOAD_SIZE:
raise ValidationError("Arquivo muito grande. ( > 5mb )")
max_size = str(MAX_DOC_UPLOAD_SIZE / (1024 * 1024))
raise ValidationError(
"Arquivo muito grande. ( > {0}MB )".format(max_size))
return texto_original
def clean(self):

3
sapl/materia/views.py

@ -1186,8 +1186,7 @@ def autores_ativos(materia, tipo=None):
content_type__in=ct_list).order_by(
'nome'
)
# import ipdb;
# ipdb.set_trace()
if not tipo:
autor_qs = Autor.objects.none()
for key in autores_by_ct:

Loading…
Cancel
Save