mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 06:04:11 +08:00
FIX: Skip themes that have blank URL in the themes:update
rake task (#15156)
Themes that are imported via a ZIP file do have a `remote_theme` record in the database but the record has a blank value for the `remote_url` field which means attempting to do an update git via will result in an error.
This commit is contained in:
parent
754c2ec6c1
commit
20f736aa11
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user