Fix onceoff job to only run when slack is installed

This commit is contained in:
David Taylor 2017-09-07 22:45:54 +01:00
parent 1e52671c03
commit 92e22d65da
1 changed files with 11 additions and 9 deletions

View File

@ -4,6 +4,7 @@ module Jobs
# Check if slack plugin is installed by testing if the sitesetting exists
slack_installed = defined? DiscourseSlack
if slack_installed
already_setup_rules = DiscourseChat::Channel.with_provider('slack').exists?
already_setup_sitesettings =
@ -16,6 +17,7 @@ module Jobs
migrate_settings()
migrate_data()
end
end
end