Commit 72fc02ddc3525b34f40e6932236867fed03b0726

Authored by Hugo Melo
1 parent 3bd7c4a3

Avoid crash on target returning true

  This issue is caused by delayed_job. See more on
  https://softwarepublico.gov.br/gitlab/noosfero-plugins/gamification/issues/1
Showing 1 changed file with 1 additions and 0 deletions   Show diff stats
lib/merit/point_rules.rb
... ... @@ -159,6 +159,7 @@ module Merit
159 159 end
160 160  
161 161 def profile_condition(setting, target, profile)
  162 + return false if target == true
162 163 profile.nil? || setting[:target_profile].blank? || setting[:target_profile].call(target) == profile
163 164 end
164 165  
... ...