Update relations using local user key when first setting sync user

In case items are merged before the first sync
This commit is contained in:
Dan Stillman 2017-03-01 23:34:11 -05:00
parent ba91a2ea52
commit 0d8643087a
4 changed files with 30 additions and 4 deletions

View file

@ -38,7 +38,7 @@ describe("Zotero.Relations", function () {
assert.include(rels[0], "/users/local");
yield Zotero.DB.executeTransaction(function* () {
yield Zotero.Relations.updateUser(1);
yield Zotero.Relations.updateUser(null, 1);
})
var rels = item2.getRelationsByPredicate(Zotero.Relations.relatedItemPredicate);
@ -57,7 +57,7 @@ describe("Zotero.Relations", function () {
assert.include(rels[0], "/users/1");
yield Zotero.DB.executeTransaction(function* () {
yield Zotero.Relations.updateUser(2);
yield Zotero.Relations.updateUser(1, 2);
});
var rels = item2.getRelationsByPredicate(Zotero.Relations.relatedItemPredicate);