mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
ALF-10837 Blog "isDraft" json can be inconsistent on boolean vs string, handle both
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31263 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -102,7 +102,15 @@ public class BlogPostsPost extends AbstractBlogWebScript
|
||||
}
|
||||
if (json.containsKey(DRAFT))
|
||||
{
|
||||
result.setIsDraft((Boolean)json.get(DRAFT));
|
||||
Object draft = json.get(DRAFT);
|
||||
if (draft instanceof Boolean)
|
||||
{
|
||||
result.setIsDraft((Boolean)draft);
|
||||
}
|
||||
else
|
||||
{
|
||||
result.setIsDraft( Boolean.parseBoolean((String)draft) );
|
||||
}
|
||||
}
|
||||
|
||||
// If there are no tags, this is a java.lang.String "".
|
||||
|
Reference in New Issue
Block a user