FIX: Appropriately handle uninstalled problem checks (#28771)

When running checks, we look to the existing problem check trackers and try to grab their ProblemCheck classes.

In some cases this is no longer in the problem check repository, e.g. when the check was part of a plugin that has been uninstalled.

In the case where the check was scheduled, this would lead to an error in one of the jobs
This commit is contained in:
Ted Johansson
2024-09-18 10:11:52 +08:00
committed by GitHub
parent 9b383e3729
commit e60876ce49
4 changed files with 70 additions and 15 deletions

View File

@@ -43,7 +43,14 @@ class ProblemCheckTracker < ActiveRecord::Base
end
def check
ProblemCheck[identifier]
check = ProblemCheck[identifier]
return check if check.present?
silence_the_alarm
destroy
nil
end
private