check nil on schedule

This commit is contained in:
mr 2024-08-12 09:55:55 +02:00
parent 3b1bd41638
commit 6e3069068c

View File

@ -84,7 +84,7 @@ func (wfa *workflowMongoAccessor) execution(id string, realData *Workflow, delet
}
res, _, _ := wfa.LoadOne(id)
r := res.(*Workflow)
if r.Schedule.Start == realData.Schedule.Start && r.Schedule.End == realData.Schedule.End && r.Schedule.Cron == realData.Schedule.Cron {
if r.Schedule != nil && r.Schedule.Start == realData.Schedule.Start && r.Schedule.End == realData.Schedule.End && r.Schedule.Cron == realData.Schedule.Cron {
return 200, nil
}
if !realData.CheckBooking() {