From a87321487197edc1d0746dbfd266bbfb557126b3 Mon Sep 17 00:00:00 2001 From: "chris.ditcher" Date: Tue, 30 Jul 2024 15:22:50 -0700 Subject: [PATCH] Institute event was not being persisted so it had no id. Publish event relies on the event having and id so events were not being published to nats for SCHOOL_MOVED. --- .../ca/bc/gov/educ/api/institute/service/v1/SchoolService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/api/src/main/java/ca/bc/gov/educ/api/institute/service/v1/SchoolService.java b/api/src/main/java/ca/bc/gov/educ/api/institute/service/v1/SchoolService.java index e2053dd3..1f8c6bcb 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/institute/service/v1/SchoolService.java +++ b/api/src/main/java/ca/bc/gov/educ/api/institute/service/v1/SchoolService.java @@ -462,6 +462,7 @@ public Pair moveSchool(MoveSchoolData moveSchool final InstituteEvent instituteEvent = EventUtil.createInstituteEvent( movedSchool.getUpdateUser(), movedSchool.getUpdateUser(), JsonUtil.getJsonStringFromObject(moveSchoolData), MOVE_SCHOOL, SCHOOL_MOVED); + instituteEventRepository.save(instituteEvent); return Pair.of(moveSchoolData, instituteEvent); }