Repository: incubator-unomi
Updated Branches:
refs/heads/master a84a12b93 -> 139e1b751
DMF-1769 : Ensure that segments and scoring plans are up to date when importing
profiles
Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/139e1b75
Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/139e1b75
Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/139e1b75
Branch: refs/heads/master
Commit: 139e1b751e2917fae53efdc75a9c14eb97ed1c6a
Parents: a84a12b
Author: Abdelkader Midani
Authored: Tue Jul 18 11:29:42 2017 +0200
Committer: Abdelkader Midani
Committed: Tue Jul 18 11:30:09 2017 +0200
--
.../apache/unomi/router/services/ProfileImportServiceImpl.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/139e1b75/extensions/router/router-service/src/main/java/org/apache/unomi/router/services/ProfileImportServiceImpl.java
--
diff --git
a/extensions/router/router-service/src/main/java/org/apache/unomi/router/services/ProfileImportServiceImpl.java
b/extensions/router/router-service/src/main/java/org/apache/unomi/router/services/ProfileImportServiceImpl.java
index 51cbc55..dd322c3 100644
---
a/extensions/router/router-service/src/main/java/org/apache/unomi/router/services/ProfileImportServiceImpl.java
+++
b/extensions/router/router-service/src/main/java/org/apache/unomi/router/services/ProfileImportServiceImpl.java
@@ -53,13 +53,13 @@ public class ProfileImportServiceImpl extends
AbstractCustomServiceImpl implemen
for (String propName : propertiesToOverwrite) {
existingProfile.getProperties().put(propName,
profileToImport.getProperties().get(propName));
}
-//update segments and scores
-existingProfile.setSegments(profileToImport.getSegments());
-existingProfile.setScores(profileToImport.getScores());
} else { //If no property is marked to overwrite we replace the
whole properties map
logger.debug("Overwrite all properties");
existingProfile.setProperties(profileToImport.getProperties());
}
+//update segments and scores
+existingProfile.setSegments(profileToImport.getSegments());
+existingProfile.setScores(profileToImport.getScores());
} else if (existingProfiles.size() == 0) {
logger.debug("New profile to add...");
BeanUtils.copyProperties(existingProfile, profileToImport);