FIX: 500 due to absent module
This commit is contained in:
parent
37003f91ef
commit
7a269c600d
|
@ -13,7 +13,10 @@ module DiscourseAutomation
|
||||||
.where(trigger: name, enabled: true)
|
.where(trigger: name, enabled: true)
|
||||||
.find_each do |automation|
|
.find_each do |automation|
|
||||||
maximum_trust_level = automation.trigger_field("maximum_trust_level")&.dig("value")
|
maximum_trust_level = automation.trigger_field("maximum_trust_level")&.dig("value")
|
||||||
if FirstAcceptedPostSolutionValidator.check(post, trust_level: maximum_trust_level)
|
if DiscourseSolved::FirstAcceptedPostSolutionValidator.check(
|
||||||
|
post,
|
||||||
|
trust_level: maximum_trust_level,
|
||||||
|
)
|
||||||
automation.trigger!(
|
automation.trigger!(
|
||||||
"kind" => name,
|
"kind" => name,
|
||||||
"accepted_post_id" => post.id,
|
"accepted_post_id" => post.id,
|
||||||
|
|
Loading…
Reference in New Issue