@ -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
@ -17,6 +17,7 @@
ano_materia: ano_materia},
function(data, status) {
$("#id_ementa").val(data.ementa);
$("#id_indexacao").val(data.indexacao);
});
}