chore(xo-server): explicitly check for a schedule

This commit is contained in:
Julien Fontanet 2018-03-05 10:48:07 +01:00
parent e4b11a793b
commit 197273193e

View File

@ -187,6 +187,10 @@ export default class BackupNg {
runJobId, runJobId,
schedule, schedule,
}) => { }) => {
if (schedule === undefined) {
throw new Error('backup job cannot run without a schedule')
}
const job: BackupJob = (job_: any) const job: BackupJob = (job_: any)
const vms = app.getObjects({ const vms = app.getObjects({
filter: createPredicate({ filter: createPredicate({