Commit 17a1f4dfc983b29c29bfdad20ff31298987f8d40

Authored by Hugo Melo
1 parent 1883263d

Avoid recursive loop saving profile

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
lib/merit/rank_observer.rb
@@ -5,7 +5,7 @@ module Merit @@ -5,7 +5,7 @@ module Merit
5 merit = changed_data[:merit_object] 5 merit = changed_data[:merit_object]
6 if merit.kind_of?(Merit::Score::Point) 6 if merit.kind_of?(Merit::Score::Point)
7 profile = merit.score.sash.profile 7 profile = merit.score.sash.profile
8 - profile.update_attribute(:level, profile.gamification_plugin_calculate_level) if profile.present? 8 + profile.update_column(:level, profile.gamification_plugin_calculate_level) if profile.present?
9 end 9 end
10 end 10 end
11 end 11 end