Skip to content

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

FIX: Skip themes that have blank URL in the `themes:update` rake task (#15156)

Osama Sayegh20f736aa1121
diff --git a/lib/tasks/themes.rake b/lib/tasks/themes.rake
index 5dbcae6367c..34893c8f29f 100644
--- a/lib/tasks/themes.rake
+++ b/lib/tasks/themes.rake
@@ -56,7 +56,7 @@ def update_themes
Theme.includes(:remote_theme).where(enabled: true, auto_update: true).find_each do |theme|
begin
remote_theme = theme.remote_theme
- next if remote_theme.blank?
+ next if remote_theme.blank? || remote_theme.remote_url.blank?
puts "Updating '#{theme.name}' for '#{RailsMultisite::ConnectionManagement.current_db}'..."
remote_theme.update_from_remote