Skip to content

Commit

Permalink
actually fixed disable schedule filter -_-
Browse files Browse the repository at this point in the history
  • Loading branch information
BroodjeAap committed May 28, 2023
1 parent 45a7738 commit cb327f5
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions web/scraping.go
Original file line number Diff line number Diff line change
Expand Up @@ -1424,12 +1424,16 @@ func getFilterResultDisableSchedules(filter *Filter, web *Web, debug bool) {

web.db.Model(&Filter{}).Where("watch_id = ? AND type = 'cron'", filter.WatchID).Update("Var2", "no")

entryID, exist := web.cronWatch[filter.ID]
if !exist {
return
var cronFilters []Filter
web.db.Model(&Filter{}).Where("watch_id = ? AND type = 'cron'", filter.WatchID).Find(&cronFilters)
for _, cronFilter := range cronFilters {
entryID, exist := web.cronWatch[cronFilter.ID]
if !exist {
return
}
web.cron.Remove(entryID)
delete(web.cronWatch, filter.ID)
}
web.cron.Remove(entryID)
delete(web.cronWatch, filter.ID)
}

// getFilterResultEcho is a debug filter type, used to bootstrap some tests
Expand Down

0 comments on commit cb327f5

Please sign in to comment.