|
@@ -3,6 +3,7 @@
|
|
|
const { ObjectId, ReadPreference, MongoError } = require('mongodb')
|
|
const { ObjectId, ReadPreference, MongoError } = require('mongodb')
|
|
|
const { Chunk } = require('overleaf-editor-core')
|
|
const { Chunk } = require('overleaf-editor-core')
|
|
|
const OError = require('@overleaf/o-error')
|
|
const OError = require('@overleaf/o-error')
|
|
|
|
|
+const config = require('config')
|
|
|
const assert = require('../assert')
|
|
const assert = require('../assert')
|
|
|
const mongodb = require('../mongodb')
|
|
const mongodb = require('../mongodb')
|
|
|
const { ChunkVersionConflictError } = require('./errors')
|
|
const { ChunkVersionConflictError } = require('./errors')
|
|
@@ -259,6 +260,9 @@ async function updateProjectRecord(
|
|
|
earliestChangeTimestamp,
|
|
earliestChangeTimestamp,
|
|
|
mongoOpts = {}
|
|
mongoOpts = {}
|
|
|
) {
|
|
) {
|
|
|
|
|
+ if (!config.has('backupStore')) {
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
// record the end version against the project
|
|
// record the end version against the project
|
|
|
await mongodb.projects.updateOne(
|
|
await mongodb.projects.updateOne(
|
|
|
{
|
|
{
|