You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by md...@apache.org on 2019/10/15 12:36:39 UTC

[syncope] branch master updated: [SYNCOPE-1504]

This is an automated email from the ASF dual-hosted git repository.

mdisabatino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/syncope.git


The following commit(s) were added to refs/heads/master by this push:
     new 352bd60  [SYNCOPE-1504]
352bd60 is described below

commit 352bd60131f0cb10526108b54167ffbbab93e731
Author: Marco Di Sabatino Di Diodoro <ma...@tirasa.net>
AuthorDate: Tue Oct 15 14:28:43 2019 +0200

    [SYNCOPE-1504]
---
 .../core/provisioning/java/pushpull/PullJobDelegate.java     | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/PullJobDelegate.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/PullJobDelegate.java
index 26e7377..14de90b 100644
--- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/PullJobDelegate.java
+++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/PullJobDelegate.java
@@ -351,11 +351,13 @@ public class PullJobDelegate extends AbstractProvisioningJobDelegate<PullTask> i
 
                     if (provision.getUidOnCreate() != null) {
                         AnyUtils anyUtils = anyUtilsFactory.getInstance(provision.getAnyType().getKind());
-                        profile.getResults().stream()
-                                .filter(result -> result.getUidValue() != null
-                                && result.getOperation() == ResourceOperation.CREATE)
-                                .forEach(result -> anyUtils.addAttr(result.getKey(),
-                                provision.getUidOnCreate(), result.getUidValue()));
+                        profile.getResults().stream().
+                                filter(result -> result.getUidValue() != null
+                                && result.getOperation() == ResourceOperation.CREATE
+                                && result.getAnyType().equals(provision.getAnyType().getKey())).
+                                forEach(result -> {
+                                    anyUtils.addAttr(result.getKey(), provision.getUidOnCreate(), result.getUidValue());
+                                });
                     }
                 } catch (Throwable t) {
                     throw new JobExecutionException("While pulling from connector", t);