Skip to content

Commit

Permalink
Update student contact was returning an object with a null schoolId a…
Browse files Browse the repository at this point in the history
…nd also for nats message payload.
  • Loading branch information
chris.ditcher authored and chris.ditcher committed Jun 27, 2024
1 parent 033dfb7 commit 5750ee6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,11 @@ public Pair<SchoolContactEntity, InstituteEvent> updateSchoolContact(SchoolConta
schoolContactRepository.save(currentContactEntity);
final InstituteEvent instituteEvent = EventUtil.createInstituteEvent(
contact.getCreateUser(), contact.getUpdateUser(),
JsonUtil.getJsonStringFromObject(SchoolContactMapper.mapper.toStructure(contactEntity)),
JsonUtil.getJsonStringFromObject(SchoolContactMapper.mapper.toStructure(currentContactEntity)),
UPDATE_SCHOOL_CONTACT, SCHOOL_CONTACT_UPDATED
);
instituteEventRepository.save(instituteEvent);
return Pair.of(contactEntity, instituteEvent);
return Pair.of(currentContactEntity, instituteEvent);
} else {
throw new EntityNotFoundException(SchoolContactEntity.class, CONTACT_ID_ATTR,
String.valueOf(contactId));
Expand Down

0 comments on commit 5750ee6

Please sign in to comment.