From 8372911a1b8cb057dd4883f47a453e35297568d6 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Fri, 11 Aug 2017 16:56:30 +0100 Subject: [PATCH] return doclines as array from getProjectDocs for compatibility with getDoc --- services/document-updater/app/coffee/ProjectManager.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/document-updater/app/coffee/ProjectManager.coffee b/services/document-updater/app/coffee/ProjectManager.coffee index c25f51277f..60446485b0 100644 --- a/services/document-updater/app/coffee/ProjectManager.coffee +++ b/services/document-updater/app/coffee/ProjectManager.coffee @@ -88,7 +88,10 @@ module.exports = ProjectManager = if error? logger.error err: error, project_id: project_id, doc_id: doc_id, "error getting project doc lines" return cb(error) - docs.push {_id: doc_id, lines: lines, v: version} + try + docs.push {_id: doc_id, lines: JSON.parse(lines), v: version} + catch e + return cb(e) cb() async.series jobs, (error) -> return callback(error) if error?