Skip to content

A platform for community discussion. Free, open, simple.

FIX: Save updated remote theme, only update enabled themes/components (#11960)

Penar Musaraj3da2e85855f5
diff --git a/lib/tasks/themes.rake b/lib/tasks/themes.rake
index 0d52090e99d..3ac9c33672d 100644
--- a/lib/tasks/themes.rake
+++ b/lib/tasks/themes.rake
@@ -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}"