[SYNCOPE-1352] Group wizard doesn't update the plain attributes
authorMarco Di Sabatino Di Diodoro <marco.disabatino@tirasa.net>
Fri, 10 Aug 2018 13:45:14 +0000 (15:45 +0200)
committerMarco Di Sabatino Di Diodoro <marco.disabatino@tirasa.net>
Fri, 10 Aug 2018 13:47:36 +0000 (15:47 +0200)
client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyObjectWizardBuilder.java
client/console/src/main/java/org/apache/syncope/client/console/wizards/any/GroupWizardBuilder.java

index 184de10..8e21f0f 100644 (file)
@@ -72,6 +72,7 @@ public class AnyObjectWizardBuilder extends AnyWizardBuilder<AnyObjectTO> implem
         if (inner.getKey() == null) {
             result = anyObjectRestClient.create(inner);
         } else {
+            inner.getPlainAttrs().addAll(cleanEmptyPlainAttrs(inner.getPlainAttrs()));
             AnyObjectPatch patch = AnyOperations.diff(inner, getOriginalItem().getInnerObject(), false);
 
             // update just if it is changed
index ea4c22e..81c6648 100644 (file)
@@ -91,7 +91,6 @@ public class GroupWizardBuilder extends AnyWizardBuilder<GroupTO> implements Gro
         if (inner.getKey() == null) {
             result = groupRestClient.create(inner);
         } else {
-            inner.getPlainAttrs().clear();
             inner.getPlainAttrs().addAll(cleanEmptyPlainAttrs(inner.getPlainAttrs()));
             GroupPatch patch = AnyOperations.diff(inner, getOriginalItem().getInnerObject(), false);
             GroupTO originaObj = getOriginalItem().getInnerObject();