mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 03:37:15 +08:00
FIX: create an automation with forced_triggerable enabled (#29030)
When trying to create a new automation based on a scriptable that has "force_triggerable" enable, it would break because of a typo in the code. This fixes the typo and add a spec to ensure this code path is tested.
This commit is contained in:
@ -29,7 +29,7 @@ module DiscourseAutomation
|
||||
)
|
||||
|
||||
if automation.scriptable&.forced_triggerable
|
||||
automation.trigger = scriptable.forced_triggerable[:triggerable].to_s
|
||||
automation.trigger = automation.scriptable.forced_triggerable[:triggerable].to_s
|
||||
end
|
||||
|
||||
automation.save!
|
||||
|
Reference in New Issue
Block a user