From 80bdf51ecb536a5953660204155933e70c932af7 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 13 Dec 2022 23:29:27 -0700 Subject: [PATCH] Store Mendeley importer version number in database --- chrome/content/zotero/import/mendeley/mendeleyImport.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chrome/content/zotero/import/mendeley/mendeleyImport.js b/chrome/content/zotero/import/mendeley/mendeleyImport.js index a67c4917eb..532416289c 100644 --- a/chrome/content/zotero/import/mendeley/mendeleyImport.js +++ b/chrome/content/zotero/import/mendeley/mendeleyImport.js @@ -9,6 +9,7 @@ Services.scriptloader.loadSubScript("chrome://zotero/content/import/mendeley/men Services.scriptloader.loadSubScript("chrome://zotero/content/import/mendeley/mendeleyAPIUtils.js"); Services.scriptloader.loadSubScript("chrome://zotero/content/import/mendeley/mendeleySchemaMap.js"); +const importerVersion = 1; const { apiTypeToDBType, apiFieldToDBField } = mendeleyOnlineMappings; const { apiFetch, codeAuth, directAuth, get, getAll } = mendeleyAPIUtils; @@ -315,6 +316,9 @@ Zotero_Import_Mendeley.prototype.translate = async function (options = {}) { const rootCollection = await Zotero.Collections.getAsync(options.collections[0]); await rootCollection.eraseTx(this._saveOptions); } + + await Zotero.DB.queryAsync("REPLACE INTO settings VALUES ('mendeleyImport', 'version', ?)", importerVersion); + Zotero.debug(`Completed Mendeley import in ${Math.round((Date.now() - this._started) / 1000)}s. (Started: ${this._started})`); } catch (e) {