Merge pull request #10677 from overleaf/em-history-id-string

Represent history ids as strings instead of integers

GitOrigin-RevId: 18977195b65492836e570c571ec7e8c7e088612b
This commit is contained in:
Eric Mc Sween
2022-12-02 09:04:29 +00:00
committed by Copybot
parent 0e30718892
commit 5083060fbb
10 changed files with 26 additions and 33 deletions
@@ -174,16 +174,11 @@ async function doUpgradeForNoneWithoutConversion(project) {
// Logic originally from ProjectHistoryHandler.ensureHistoryExistsForProject
// However sends a force resync project to project history instead
// of a resync request to doc-updater
const historyId = await ProjectHistoryHandler.promises.getHistoryId(
projectId
)
if (!historyId) {
const history = await HistoryManager.promises.initializeProject()
if (history && history.overleaf_id) {
await ProjectHistoryHandler.promises.setHistoryId(
projectId,
history.overleaf_id
)
let historyId = await ProjectHistoryHandler.promises.getHistoryId(projectId)
if (historyId == null) {
historyId = await HistoryManager.promises.initializeProject()
if (historyId != null) {
await ProjectHistoryHandler.promises.setHistoryId(projectId, historyId)
}
}
await HistoryManager.promises.resyncProject(projectId, {
@@ -117,15 +117,15 @@ async function doUpgradeForNoneWithoutConversion(project) {
// Logic originally from ProjectHistoryHandler.ensureHistoryExistsForProject
// However sends a force resync project to project history instead
// of a resync request to doc-updater
const historyId = await ProjectHistoryHandler.promises.getHistoryId(
let historyId = await ProjectHistoryHandler.promises.getHistoryId(
projectId
)
if (!historyId) {
const history = await HistoryManager.promises.initializeProject()
if (history && history.overleaf_id) {
if (historyId == null) {
historyId = await HistoryManager.promises.initializeProject()
if (historyId != null) {
await ProjectHistoryHandler.promises.setHistoryId(
projectId,
history.overleaf_id
historyId
)
}
}