FIX: Save updated remote theme, only update enabled themes/components (#11960)
This commit is contained in:
parent
97b55af9cf
commit
3da2e85855
|
@ -53,11 +53,12 @@ end
|
|||
|
||||
desc "Update themes & theme components"
|
||||
task "themes:update" => :environment do |task, args|
|
||||
Theme.where(auto_update: true).find_each do |theme|
|
||||
Theme.where(auto_update: true, enabled: true).find_each do |theme|
|
||||
begin
|
||||
if theme.remote_theme.present?
|
||||
puts "Updating #{theme.name}..."
|
||||
theme.remote_theme.update_from_remote
|
||||
theme.save!
|
||||
end
|
||||
rescue => e
|
||||
STDERR.puts "Failed to update #{theme.name}"
|
||||
|
|
Loading…
Reference in New Issue