From 386d8cd2f496209039227429abfe89b7ecf1c72f Mon Sep 17 00:00:00 2001 From: Marcin Ciunelis Date: Tue, 27 Sep 2011 18:11:11 +0200 Subject: [PATCH] decrease counter_cache only if err still exists --- app/models/notice.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/notice.rb b/app/models/notice.rb index f3764ce..1abf5a4 100644 --- a/app/models/notice.rb +++ b/app/models/notice.rb @@ -91,7 +91,7 @@ class Notice end def decrease_counter_cache - problem.inc(:notices_count, -1) + problem.inc(:notices_count, -1) if err end def unresolve_problem -- libgit2 0.21.2