Do not decrement the question count if the question is direct

This commit is contained in:
Andreas Nedbal 2022-07-24 22:25:13 +02:00
parent 2692783518
commit 4f4e6c83a1
1 changed files with 1 additions and 1 deletions

View File

@ -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