This commit is contained in:
zadam 2020-03-08 21:59:19 +01:00
parent bafd829ff6
commit 1774f48d07
2 changed files with 6 additions and 4 deletions

View File

@ -156,10 +156,7 @@ async function pullSync(syncContext) {
appliedPulls++;
}
// can be undefined for options with isSynced=false
if (entity) {
await syncUpdateService.updateEntity(sync, entity, syncContext.sourceId);
}
await syncUpdateService.updateEntity(sync, entity, syncContext.sourceId);
}
stats.outstandingPulls = resp.maxSyncId - sync.id;

View File

@ -4,6 +4,11 @@ const syncTableService = require('./sync_table');
const eventService = require('./events');
async function updateEntity(sync, entity, sourceId) {
// can be undefined for options with isSynced=false
if (!entity) {
return;
}
const {entityName} = sync;
if (entityName === 'notes') {