This is an automated email from the ASF dual-hosted git repository.
jkevan pushed a commit to branch unomi-1.4.x
in repository https://gitbox.apache.org/repos/asf/unomi.git
The following commit(s) were added to refs/heads/unomi-1.4.x by this push:
new b2762ce UNOMI-417: fix profile persist when receivint multiple events
that modify the profile (#240)
b2762ce is described below
commit b2762ce6037ec292e6a399dcab527d1bf77515a6
Author: kevan Jahanshahi <[email protected]>
AuthorDate: Mon Jan 25 12:13:43 2021 +0100
UNOMI-417: fix profile persist when receivint multiple events that modify
the profile (#240)
# Conflicts:
# wab/src/main/java/org/apache/unomi/web/ServletCommon.java
---
wab/src/main/java/org/apache/unomi/web/ServletCommon.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/wab/src/main/java/org/apache/unomi/web/ServletCommon.java
b/wab/src/main/java/org/apache/unomi/web/ServletCommon.java
index da27fca..d9d9885 100644
--- a/wab/src/main/java/org/apache/unomi/web/ServletCommon.java
+++ b/wab/src/main/java/org/apache/unomi/web/ServletCommon.java
@@ -85,8 +85,8 @@ public class ServletCommon {
eventToSend.getAttributes().put(Event.HTTP_REQUEST_ATTRIBUTE, request);
eventToSend.getAttributes().put(Event.HTTP_RESPONSE_ATTRIBUTE, response);
logger.debug("Received event " + event.getEventType() + "
for profile=" + profile.getItemId() + " session="
- + session.getItemId() + " target=" +
event.getTarget() + " timestamp=" + timestamp);
- changes = eventService.send(eventToSend);
+ + (session != null ? session.getItemId() : null) +
" target=" + event.getTarget() + " timestamp=" + timestamp);
+ changes |= eventService.send(eventToSend);
// If the event execution changes the profile we need to
update it so the next event use the right profile
if ((changes & EventService.PROFILE_UPDATED) ==
EventService.PROFILE_UPDATED) {
profile = eventToSend.getProfile();