From 4f4e6c83a1b9286864714d5ff5e57349346100e9 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Sun, 24 Jul 2022 22:25:13 +0200 Subject: [PATCH] Do not decrement the question count if the question is direct --- app/models/question.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/question.rb b/app/models/question.rb index 2e0fcffb..f9b8e4c3 100644 --- a/app/models/question.rb +++ b/app/models/question.rb @@ -17,7 +17,7 @@ class Question < ApplicationRecord end # rubocop:disable Rails/SkipsModelValidations - user&.decrement! :asked_count unless author_is_anonymous + user&.decrement! :asked_count unless author_is_anonymous || direct # rubocop:enable Rails/SkipsModelValidations end