From 137a0ebbfda5c7d92879be9a1670d1248a2723bf Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 10 Mar 2018 11:18:06 -0500 Subject: [PATCH] Don't delete automatic tags after web translation Regression from c8cf9b9e6f, probably --- chrome/content/zotero/xpcom/server_connector.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/server_connector.js b/chrome/content/zotero/xpcom/server_connector.js index b17db68655..b33118f400 100644 --- a/chrome/content/zotero/xpcom/server_connector.js +++ b/chrome/content/zotero/xpcom/server_connector.js @@ -191,9 +191,13 @@ Zotero.Server.Connector.SaveSession.prototype._updateObjects = async function (o if (object.libraryID != libraryID) { throw new Error("Can't move objects between libraries"); } - // Assign tags and collections to top-level items + + // Keep automatic tags + let originalTags = object.getTags().filter(tag => tag.type == 1); + + // Assign manual tags and collections to top-level items if (objectType == 'item' && object.isTopLevelItem()) { - object.setTags(tags); + object.setTags(originalTags.concat(tags)); object.setCollections(collectionID ? [collectionID] : []); await object.save(); }