Explorar o código

don't log out when doc lines are [] as this is a new empty doc

Henry Oswald %!s(int64=11) %!d(string=hai) anos
pai
achega
3cd3c118d1
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      services/docstore/app/coffee/DocManager.coffee

+ 2 - 1
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}")