* VRFS-1323 - protect against null entries
This commit is contained in:
parent
aa62cc7d2a
commit
608f4b2b13
|
|
@ -206,10 +206,10 @@ class UsersController < ApplicationController
|
|||
Slide.new("bands", "web/carousel_bands.jpg", "http://www.youtube.com/embed/eaYNM7p6Z5s")
|
||||
]
|
||||
|
||||
@promo_buzz = Promotional.where(:type => 'JamRuby::PromoBuzz', :aasm_state => :active).order(:position)
|
||||
@promo_buzz = Promotional.where(:type => 'JamRuby::PromoBuzz', :aasm_state => :active).where('latest_id IS NOT NULL').order(:position)
|
||||
|
||||
if Rails.application.config.use_promos_on_homepage
|
||||
@promo_latest = Promotional.where(:type => 'JamRuby::PromoLatest', :aasm_state => :active).order(:position).limit(10)
|
||||
@promo_latest = Promotional.where(:type => 'JamRuby::PromoLatest', :aasm_state => :active).where('latest_id IS NOT NULL').order(:position).limit(10)
|
||||
else
|
||||
@promo_latest, start = Feed.index(nil, limit: 10)
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue