Don't throw error if no salesPerson is assigned

This commit is contained in:
Joan Sanchez 2020-02-20 12:52:05 +01:00
parent 54bc1bc281
commit 2f089681df
1 changed files with 4 additions and 2 deletions

View File

@ -108,8 +108,10 @@ module.exports = Self => {
await Promise.all(promises); await Promise.all(promises);
query = `call vn.manaSpellersRequery(?)`; if (salesPersonId) {
await Self.rawSql(query, [salesPersonId], options); const query = `call vn.manaSpellersRequery(?)`;
await Self.rawSql(query, [salesPersonId], options);
}
await tx.commit(); await tx.commit();
} catch (error) { } catch (error) {