fix for
``` 0|camera | knexError----------------------------------- END 0|camera | TypeError: Cannot read properties of undefined (reading 'forEach') 0|camera | at /home/Shinobi/libs/scheduler.js:11:18 0|camera | at /home/Shinobi/libs/database/utils.js:159:33 0|camera | at __node_internal_ (node:util:281:10) 0|camera | at processTicksAndRejections (node:internal/process/task_queues:83:21) 0|camera | Uncaught Exception occured! Wed Jul 06 2022 03:58:06 GMT+0000 (Coordinated Universal Time) ```merge-requests/367/head
parent
a2faa40ab0
commit
267cd88500
|
|
@ -8,10 +8,11 @@ module.exports = function(s,config,lang,app,io){
|
|||
columns: "*",
|
||||
table: "Schedules"
|
||||
},(err,rows) => {
|
||||
rows.forEach(function(schedule){
|
||||
|
||||
rows && rows.forEach(function(schedule){
|
||||
s.updateSchedule(schedule)
|
||||
})
|
||||
if(callback)callback()
|
||||
if(callback && typeof callback === 'function')callback()
|
||||
})
|
||||
}
|
||||
//update schedule
|
||||
|
|
|
|||
Loading…
Reference in New Issue