Commit 1f380c99da217d5dacbee4ae569d2c890ce71e9a

Authored by Rafael Martins
1 parent 12e2128a

Small fix for Article when there's no profile

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/models/article.rb
... ... @@ -674,7 +674,7 @@ class Article < ActiveRecord::Base
674 674 {:comments => {:fields => [:title, :body, :author_name, :author_email]}},
675 675 {:categories => {:fields => [:name, :path, :slug, :lat, :lng, :acronym, :abbreviation]}},
676 676 ], :facets => facets_option_for_solr,
677   - :boost => proc { |a| 10 if a.profile.enabled },
  677 + :boost => proc { |a| 10 if a.profile && a.profile.enabled },
678 678 :if => proc{ |a| ! ['RssFeed'].include?(a.class.name) }
679 679 handle_asynchronously :solr_save
680 680  
... ...