From 00e758f0ef328678e4aee1ae15ab8c538b370f43 Mon Sep 17 00:00:00 2001 From: santiago Date: Thu, 2 Oct 2025 16:03:52 -0600 Subject: [PATCH] Modificaciones --- src/cuestionario/cuestionario.service.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/cuestionario/cuestionario.service.ts b/src/cuestionario/cuestionario.service.ts index 4bd93e5..ee27255 100644 --- a/src/cuestionario/cuestionario.service.ts +++ b/src/cuestionario/cuestionario.service.ts @@ -383,17 +383,19 @@ export class CuestionarioService { await queryRunner.startTransaction(); try { + /* // Buscar si ya existe un evento con el nombre proporcionado let eventoExistente = await this.eventoRepository.findOne({ where: { nombre_evento: evento.nombre_evento }, }); + **/ // Si el evento no existe, crearlo - if (!eventoExistente) { - eventoExistente = queryRunner.manager.create(Evento, evento); + //if (!eventoExistente) { + let eventoExistente = queryRunner.manager.create(Evento, evento); await queryRunner.manager.save(eventoExistente); console.log(`Creando nuevo evento: ${evento.nombre_evento}`); - } + //} // Crear el cuestionario asociado al evento const cuestionarioEntity = queryRunner.manager.create(Cuestionario, {