Browse Source

HOT-FIX: corrige carga de Content Type Choice

pull/3623/head
LeandroJatai 2 years ago
parent
commit
ed7b1d4ee3
  1. 21
      sapl/materia/forms.py

21
sapl/materia/forms.py

@ -1490,15 +1490,18 @@ class TramitacaoEmLoteFilterSet(django_filters.FilterSet):
class TipoProposicaoForm(ModelForm): class TipoProposicaoForm(ModelForm):
content_types_choices = [ try:
( content_types_choices = [
f'{ct.app_label}/{ct.model}', (
ct f'{ct.app_label}/{ct.model}',
) ct
for k, ct in ContentType.objects.get_for_models( )
*models_with_gr_for_model(TipoProposicao) for k, ct in ContentType.objects.get_for_models(
).items() *models_with_gr_for_model(TipoProposicao)
] ).items()
]
except:
content_types_choices = []
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

Loading…
Cancel
Save