log the case where there are no entries in the document history

This commit is contained in:
Brian Gough
2015-09-16 15:34:30 +01:00
parent 82d0f4fce8
commit 1c1b1d9595
@@ -28,6 +28,7 @@ module.exports = DocArchiveManager =
MongoManager.getDocChangesCount doc_id, (error, count) ->
return callback(error) if error?
if count == 0
logger.log {project_id, doc_id}, "document history is empty, not archiving"
return callback()
else
MongoManager.getLastCompressedUpdate doc_id, (error, update) ->