Debugging for https://forums.zotero.org/discussion/63363/
This commit is contained in:
parent
45c944e731
commit
1472781ce4
|
@ -822,7 +822,25 @@ Zotero.Sync.Data.Engine.prototype._startUpload = Zotero.Promise.coroutine(functi
|
||||||
let unsyncedKeys = ids.map(id => objectsClass.getLibraryAndKeyFromID(id).key);
|
let unsyncedKeys = ids.map(id => objectsClass.getLibraryAndKeyFromID(id).key);
|
||||||
let queueKeys = yield Zotero.Sync.Data.Local.getObjectsFromSyncQueue(objectType, this.libraryID);
|
let queueKeys = yield Zotero.Sync.Data.Local.getObjectsFromSyncQueue(objectType, this.libraryID);
|
||||||
unsyncedKeys = Zotero.Utilities.arrayDiff(unsyncedKeys, queueKeys);
|
unsyncedKeys = Zotero.Utilities.arrayDiff(unsyncedKeys, queueKeys);
|
||||||
ids = unsyncedKeys.map(key => objectsClass.getIDFromLibraryAndKey(this.libraryID, key));
|
// TEMP
|
||||||
|
//ids = unsyncedKeys.map(key => objectsClass.getIDFromLibraryAndKey(this.libraryID, key));
|
||||||
|
let missing = [];
|
||||||
|
ids = unsyncedKeys.map(key => {
|
||||||
|
let id = objectsClass.getIDFromLibraryAndKey(this.libraryID, key)
|
||||||
|
if (!id) {
|
||||||
|
missing.push(key);
|
||||||
|
}
|
||||||
|
return id;
|
||||||
|
});
|
||||||
|
if (missing.length) {
|
||||||
|
Zotero.debug("Missing " + objectTypePlural + ":");
|
||||||
|
for (let key of missing) {
|
||||||
|
Zotero.debug(yield Zotero.DB.valueQueryAsync(
|
||||||
|
`SELECT ${objectsClass.idColumn} FROM ${objectsClass.table} WHERE libraryID=? AND key=?`,
|
||||||
|
[this.libraryID, key]
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (ids.length) {
|
if (ids.length) {
|
||||||
Zotero.debug(ids.length + " "
|
Zotero.debug(ids.length + " "
|
||||||
|
|
Loading…
Reference in New Issue
Block a user