From 3cd3c118d1aefef65e5da280a7902f1a044dbd91 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Mon, 23 Feb 2015 13:17:55 +0000 Subject: [PATCH] don't log out when doc lines are [] as this is a new empty doc --- services/docstore/app/coffee/DocManager.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/docstore/app/coffee/DocManager.coffee b/services/docstore/app/coffee/DocManager.coffee index 49d34a7399..b0f540fecb 100644 --- a/services/docstore/app/coffee/DocManager.coffee +++ b/services/docstore/app/coffee/DocManager.coffee @@ -16,7 +16,8 @@ module.exports = DocManager = if docFromDocCollection? return callback null, docFromDocCollection, mongoPath else if doc? - logger.warn project_id:project_id, doc_id:doc_id, "doc just used from project collection, why?" + if doc?.lines?.length > 0 + logger.warn project_id:project_id, doc_id:doc_id, "doc just used from project collection, why?" return callback null, doc, mongoPath else return callback new Errors.NotFoundError("No such doc: #{project_id}")