Do not decrement the question count if the question is direct
This commit is contained in:
parent
2692783518
commit
4f4e6c83a1
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue