REPO-1646: V1 REST API - cannot unset optional fields (eg. when updating person / site details ...)

- part 1 (Update Site)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@133290 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2016-11-30 12:03:30 +00:00
parent cdd3bb0a38
commit c6a643ae99
5 changed files with 97 additions and 34 deletions

View File

@@ -1179,15 +1179,15 @@ public class SitesImpl implements Sites
}
// Bind any provided values to the site info, allowing for "partial" updates.
if (update.getTitle() != null)
if (update.wasSet(Site.TITLE))
{
siteInfo.setTitle(update.getTitle());
}
if (update.getDescription() != null)
if (update.wasSet(Site.DESCRIPTION))
{
siteInfo.setDescription(update.getDescription());
}
if (update.getVisibility() != null)
if (update.wasSet(Site.VISIBILITY))
{
siteInfo.setVisibility(update.getVisibility());
}