From 9c73fb1d43dc9bc9483af68f1b570cb9f3c3bab6 Mon Sep 17 00:00:00 2001 From: Victor Fabre Date: Tue, 21 Aug 2018 13:04:51 -0300 Subject: [PATCH] Fix #2141 (#2148) --- sapl/sessao/views.py | 5 +++-- sapl/templates/norma/normajuridica_form.html | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sapl/sessao/views.py b/sapl/sessao/views.py index c9e1e0e00..5a2b0785a 100644 --- a/sapl/sessao/views.py +++ b/sapl/sessao/views.py @@ -460,9 +460,10 @@ def recuperar_materia(request): ano=ano, numero=numero) response = JsonResponse({'ementa': materia.ementa, - 'id': materia.id}) + 'id': materia.id, + 'indexacao': materia.indexacao}) except ObjectDoesNotExist: - response = JsonResponse({'ementa': '', 'id': 0}) + response = JsonResponse({'ementa': '', 'id': 0, 'indexacao':''}) return response diff --git a/sapl/templates/norma/normajuridica_form.html b/sapl/templates/norma/normajuridica_form.html index 58a48046a..ce91c8838 100644 --- a/sapl/templates/norma/normajuridica_form.html +++ b/sapl/templates/norma/normajuridica_form.html @@ -17,6 +17,7 @@ ano_materia: ano_materia}, function(data, status) { $("#id_ementa").val(data.ementa); + $("#id_indexacao").val(data.indexacao); }); } }