Update njodb version

This commit is contained in:
advplyr 2022-01-24 16:53:35 -06:00
parent ff4ca0f675
commit 5bd6c8f553
3 changed files with 13 additions and 8 deletions

View file

@ -258,7 +258,12 @@ class Db {
}
return entityDb.update((record) => record.id === entity.id, () => jsonEntity).then((results) => {
Logger.debug(`[DB] Updated ${entityName}: ${results.updated}`)
if (process.env.NODE_ENV !== 'production') {
Logger.debug(`[DB] Updated ${entityName}: ${results.updated} | Selected: ${results.selected}`)
} else {
Logger.debug(`[DB] Updated ${entityName}: ${results.updated}`)
}
var arrayKey = this.getEntityArrayKey(entityName)
this[arrayKey] = this[arrayKey].map(e => {
return e.id === entity.id ? entity : e