Skip to content

Commit

Permalink
Merge pull request #261 from ares/fix/19621
Browse files Browse the repository at this point in the history
Fixes #19621 - restore compatibility with new REX
  • Loading branch information
xprazak2 committed May 25, 2017
2 parents e3452a3 + 30ec154 commit 925b10d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion db/seeds.d/75-job_templates.rb
Expand Up @@ -3,7 +3,12 @@
JobTemplate.without_auditing do
Dir[File.join("#{ForemanOpenscap::Engine.root}/app/views/job_templates/**/*.erb")].each do |template|
sync = !Rails.env.test? && Setting[:remote_execution_sync_templates]
JobTemplate.import!(File.read(template), :default => true, :locked => true, :update => sync)
# import! was renamed to import_raw! around 1.3.1
if JobTemplate.respond_to?('import_raw!')
JobTemplate.import_raw!(File.read(template), :default => true, :locked => true, :update => sync)
else
JobTemplate.import!(File.read(template), :default => true, :locked => true, :update => sync)
end
end
end
end
Expand Down

0 comments on commit 925b10d

Please sign in to comment.