sergehuber commented on code in PR #715:
URL: https://github.com/apache/unomi/pull/715#discussion_r2428594975
##########
rest/src/main/java/org/apache/unomi/rest/service/impl/RestServiceUtilsImpl.java:
##########
@@ -145,7 +145,13 @@ public EventsRequestContext initEventsRequest(String
scope, String sessionId, St
// Session user has been switched, profile id in
cookie is not up to date
// We must reload the profile with the session ID as
some properties could be missing from the session profile
// #personalIdentifier
-
eventsRequestContext.setProfile(profileService.load(sessionProfile.getItemId()));
+ Profile sessionProfileWithId =
profileService.load(sessionProfile.getItemId());
+ if (sessionProfileWithId != null) {
+
eventsRequestContext.setProfile(sessionProfileWithId);
+ } else {
+ LOGGER.warn("Couldn't find profile ID {}
referenced from session with ID {}, so we re-create it",
sessionProfile.getItemId(), sessionId);
+
eventsRequestContext.setProfile(createNewProfile(sessionProfile.getItemId(),
timestamp));
+ }
Review Comment:
I have removed this change from this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]