From ef499680aacf158a2dee7f56533b06cda08889b4 Mon Sep 17 00:00:00 2001 From: Miguel Serrano Date: Thu, 9 Feb 2023 15:20:26 +0100 Subject: [PATCH] Merge pull request #11708 from overleaf/bg-reinitialise-project-history allow re-initialisation of history GitOrigin-RevId: 85caf506df736917f6870f68b3bfab46d57aa28e --- .../history-migration/app/src/ProjectHistoryController.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/services/web/modules/history-migration/app/src/ProjectHistoryController.js b/services/web/modules/history-migration/app/src/ProjectHistoryController.js index aa80cfee8c..1f0a78e032 100644 --- a/services/web/modules/history-migration/app/src/ProjectHistoryController.js +++ b/services/web/modules/history-migration/app/src/ProjectHistoryController.js @@ -919,9 +919,12 @@ async function buildUpdates( * @returns {Promise} */ async function deleteProjectHistory(projectId) { - await HistoryManager.promises.deleteProjectHistory(projectId) + // look up the history id from the project + const historyId = await ProjectHistoryHandler.promises.getHistoryId(projectId) + // delete the history from project-history and history-v1 + await HistoryManager.promises.deleteProject(projectId, historyId) // TODO: send a message to document-updater? - await ProjectHistoryHandler.unsetHistory(projectId) + await ProjectHistoryHandler.promises.unsetHistory(projectId) } /**