FIX: output css for category backgrounds only if uploads have a url
This commit is contained in:
parent
2c284874b4
commit
c12a53449c
|
@ -61,7 +61,7 @@ module Stylesheet
|
||||||
register_import "category_backgrounds" do
|
register_import "category_backgrounds" do
|
||||||
contents = ""
|
contents = ""
|
||||||
Category.where('uploaded_background_id IS NOT NULL').each do |c|
|
Category.where('uploaded_background_id IS NOT NULL').each do |c|
|
||||||
contents << category_css(c) if c.uploaded_background
|
contents << category_css(c) if c.uploaded_background&.url.present?
|
||||||
end
|
end
|
||||||
|
|
||||||
Import.new("categoy_background.scss", source: contents)
|
Import.new("categoy_background.scss", source: contents)
|
||||||
|
|
Loading…
Reference in New Issue