Skip to content

Commit

Permalink
Fix CoreEvent vague json converting in temp events
Browse files Browse the repository at this point in the history
  • Loading branch information
Marchosiax committed Oct 22, 2023
1 parent eabac88 commit 5520012
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class TempEventPersisterImpl(
override suspend fun loadTempEvents(ouid: String): List<CoreEvent> {
return tempEventRepository
.findByOuid(ouid)
.map { objectMapper.readValue<CoreEvent>(it.eventBody) }
.map { objectMapper.readValue(it.eventBody, Class.forName(it.eventType)) as CoreEvent }
.toList()
}

Expand All @@ -56,7 +56,7 @@ class TempEventPersisterImpl(
TempEvent(
it.id!!,
it.ouid,
objectMapper.readValue(it.eventBody),
objectMapper.readValue(it.eventBody, Class.forName(it.eventType)) as CoreEvent,
it.eventDate
)
}
Expand Down

0 comments on commit 5520012

Please sign in to comment.