Commit a93710b3a73017f17f163e35469b99eed54e789c

Authored by Hugo Melo
1 parent b8cb82b6

Don't initialize point_rules if there's no environment

Showing 1 changed file with 1 additions and 2 deletions   Show diff stats
lib/merit/point_rules.rb
... ... @@ -177,9 +177,8 @@ module Merit
177 177 end
178 178  
179 179 def initialize(environment=nil)
180   - #return if environment.nil?
  180 + return if environment.nil?
181 181 @environment = environment
182   - @environment = Environment.default if environment.nil?
183 182  
184 183 AVAILABLE_RULES.each do |point_type, setting|
185 184 GamificationPlugin::PointsCategorization.by_type(point_type).includes(:profile).each do |categorization|
... ...