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
|
end
|
||||||
|
|
||||||
# rubocop:disable Rails/SkipsModelValidations
|
# 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
|
# rubocop:enable Rails/SkipsModelValidations
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue