Matt Ward
2016-12-15 11:51:07 +00:00
parent 99b7e71d44
commit 65849b1f8d
2 changed files with 49 additions and 3 deletions

View File

@@ -594,6 +594,11 @@ public class PeopleImpl implements People
savePersonDescription(person.getDescription(), personNodeRef);
}
// Update custom aspects - do this *before* adding custom properties. The
// addition of custom properties may result in the auto-addition of aspects
// and we don't want to remove them during the update of explicitly specified aspects.
nodes.updateCustomAspects(personNodeRef, person.getAspectNames(), EXCLUDED_ASPECTS);
// Add custom properties
if (person.getProperties() != null)
{
@@ -611,9 +616,6 @@ public class PeopleImpl implements People
return null;
}
});
// Update custom aspects
nodes.updateCustomAspects(personNodeRef, person.getAspectNames(), EXCLUDED_ASPECTS);
return getPerson(personId);
}