mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-15 15:02:20 +00:00
Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)
104503: Merged 5.0.N (5.0.2) to HEAD-BUG-FIX (5.1/Cloud) 104354: Merged V4.2-BUG-FIX (4.2.5) to 5.0.N (5.0.2) 104274: Merged DEV (4.2.5) to V4.2-BUG-FIX (4.2.5) 102794: MNT-8678 : call to guessMimetype() on a node that has no content creates a content property - add check for empty content before saving a node git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@104627 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1693,11 +1693,22 @@ public class ScriptNode implements Scopeable, NamespacePrefixResolverProvider
|
|||||||
for (String key : this.properties.keySet())
|
for (String key : this.properties.keySet())
|
||||||
{
|
{
|
||||||
Serializable value = (Serializable) this.properties.get(key);
|
Serializable value = (Serializable) this.properties.get(key);
|
||||||
|
QName qname= createQName(key);
|
||||||
|
|
||||||
|
// MNT-8678
|
||||||
|
if (ContentModel.PROP_CONTENT.equals(qname) && (value instanceof ScriptContentData))
|
||||||
|
{
|
||||||
|
ScriptContentData contentData = (ScriptContentData) value;
|
||||||
|
if (contentData.getSize() == 0)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// perform the conversion from script wrapper object to repo serializable values
|
// perform the conversion from script wrapper object to repo serializable values
|
||||||
value = getValueConverter().convertValueForRepo(value);
|
value = getValueConverter().convertValueForRepo(value);
|
||||||
|
|
||||||
props.put(createQName(key), value);
|
props.put(qname, value);
|
||||||
}
|
}
|
||||||
this.nodeService.setProperties(this.nodeRef, props);
|
this.nodeService.setProperties(this.nodeRef, props);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user