Skip to content
Snippets Groups Projects
Commit e3b0d10f authored by juanf's avatar juanf
Browse files

SSDM-4868 : DOCX export, don't export properties with value \uFFFD(undefined)

SVN: 38103
parent 7f6f45df
No related branches found
No related tags found
No related merge requests found
...@@ -467,7 +467,8 @@ def getDOCX(entityObj, v3, sessionToken, isHTML): ...@@ -467,7 +467,8 @@ def getDOCX(entityObj, v3, sessionToken, isHTML):
propertyType = propertyAssigment.getPropertyType(); propertyType = propertyAssigment.getPropertyType();
if propertyType.getCode() in properties: if propertyType.getCode() in properties:
propertyValue = properties[propertyType.getCode()]; propertyValue = properties[propertyType.getCode()];
docxBuilder.addProperty(propertyType.getLabel(), propertyValue); if propertyValue != u"\uFFFD(undefined)":
docxBuilder.addProperty(propertyType.getLabel(), propertyValue);
if isHTML: if isHTML:
return docxBuilder.getHTMLBytes(); return docxBuilder.getHTMLBytes();
...@@ -541,9 +542,10 @@ def getTXT(entityObj, v3, sessionToken, isRichText): ...@@ -541,9 +542,10 @@ def getTXT(entityObj, v3, sessionToken, isRichText):
propertyType = propertyAssigment.getPropertyType(); propertyType = propertyAssigment.getPropertyType();
if propertyType.getCode() in properties: if propertyType.getCode() in properties:
propertyValue = properties[propertyType.getCode()]; propertyValue = properties[propertyType.getCode()];
if(propertyType.getDataType() == DataType.MULTILINE_VARCHAR and isRichText is False): if propertyValue != u"\uFFFD(undefined)":
propertyValue = strip_tags(propertyValue).strip(); if(propertyType.getDataType() == DataType.MULTILINE_VARCHAR and isRichText is False):
txtBuilder.append("- ").append(propertyType.getLabel()).append(": ").append(propertyValue).append("\n"); propertyValue = strip_tags(propertyValue).strip();
txtBuilder.append("- ").append(propertyType.getLabel()).append(": ").append(propertyValue).append("\n");
return txtBuilder.toString(); return txtBuilder.toString();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment