FIX: output css for category backgrounds only if uploads have a url

This commit is contained in:
Neil Lalonde 2017-09-11 17:10:18 -04:00
parent 2c284874b4
commit c12a53449c
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ module Stylesheet
register_import "category_backgrounds" do
contents = ""
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
Import.new("categoy_background.scss", source: contents)