commit 137a0ebbfda5c7d92879be9a1670d1248a2723bf parent 53bea1fb9fbbc4495dc0d9fb395deb597780ca17 Author: Dan Stillman <dstillman@zotero.org> Date: Sat, 10 Mar 2018 11:18:06 -0500 Don't delete automatic tags after web translation Regression from c8cf9b9e6f, probably Diffstat:
| M | 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 @@ -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(); }