DEV: Automatically remove placeholder 'URL' metadata values from themes

DEV: Automatically remove placeholder ‘URL’ metadata values from themes

diff --git a/app/models/theme.rb b/app/models/theme.rb
index 0abbbc7..fe4375c 100644
--- a/app/models/theme.rb
+++ b/app/models/theme.rb
@@ -437,6 +437,7 @@ class Theme < ActiveRecord::Base
 
       RemoteTheme::METADATA_PROPERTIES.each do |property|
         meta[property] = remote_theme&.public_send(property)
+        meta[property] = nil if meta[property] == "URL" # Clean up old discourse_theme CLI placeholders
       end
 
       meta[:assets] = {}.tap do |hash|

GitHub sha: 0d0ca4f0

1 Like