Commit a2013f11 by Joel Florentin

fix guardar postulante con tecnologia

parent 196c6893
...@@ -89,6 +89,11 @@ public class PostulanteController { ...@@ -89,6 +89,11 @@ public class PostulanteController {
@PostMapping(value = "/postulante",consumes = "application/json") @PostMapping(value = "/postulante",consumes = "application/json")
public String guardarPostulante(@RequestBody Postulante postulante){ public String guardarPostulante(@RequestBody Postulante postulante){
System.out.println("hola"); System.out.println("hola");
postulante.getTecnologias().stream().filter(
tec -> tec.getTecnologia().getId() != 0
).forEach(
tec -> tec.setTecnologia(tecRepo.getById(tec.getTecnologia().getId()))
);
for(Estudio estudio: postulante.getEstudios()){ for(Estudio estudio: postulante.getEstudios()){
Institucion institucion = institucionRepository.findByNombre(estudio.getInstitucion().getNombre()); Institucion institucion = institucionRepository.findByNombre(estudio.getInstitucion().getNombre());
if(institucion==null){ if(institucion==null){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment