A bit more fault tolerant
(e.g. when only one service is mocked)
This commit is contained in:
@@ -37,7 +37,7 @@ module.exports = async()=>{ // called by server.js
|
|||||||
// Subscribe to changes in the S4 origin of Suppliers data
|
// Subscribe to changes in the S4 origin of Suppliers data
|
||||||
S4bupa.on ('BusinessPartner.Changed', async msg => { //> would be great if we had batch events from S/4
|
S4bupa.on ('BusinessPartner.Changed', async msg => { //> would be great if we had batch events from S/4
|
||||||
let replica = await SELECT.one('ID').from (Suppliers) .where ({ID: msg.data.BusinessPartner})
|
let replica = await SELECT.one('ID').from (Suppliers) .where ({ID: msg.data.BusinessPartner})
|
||||||
return replicate (replica.ID)
|
if (replica) return replicate (replica.ID)
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user