Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit 1368317

Browse files
committed
FIX: Make sure DiscoursePrometheus is installed when collecting metrics
1 parent 381a271 commit 1368317

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/ai_moderation/spam_metric.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ module DiscourseAi
44
module AiModeration
55
class SpamMetric
66
def self.update(new_status, reviewable)
7+
return if !defined?(::DiscoursePrometheus)
78
ai_spam_log = AiSpamLog.find_by(reviewable:)
89
return if ai_spam_log.nil?
910

0 commit comments

Comments
 (0)