Don't delete automatic tags after web translation
Regression from c8cf9b9e6f
, probably
This commit is contained in:
parent
53bea1fb9f
commit
137a0ebbfd
1 changed files with 6 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue