Commit 386d8cd2f496209039227429abfe89b7ecf1c72f

Authored by Marcin Ciunelis
1 parent 6e2f33ca
Exists in master and in 1 other branch production

decrease counter_cache only if err still exists

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/models/notice.rb
... ... @@ -91,7 +91,7 @@ class Notice
91 91 end
92 92  
93 93 def decrease_counter_cache
94   - problem.inc(:notices_count, -1)
  94 + problem.inc(:notices_count, -1) if err
95 95 end
96 96  
97 97 def unresolve_problem
... ...