allow reportbooru to update post counts

This commit is contained in:
Albert Yi
2018-09-05 13:49:56 -07:00
parent f9f0da0543
commit e5010bebf9
2 changed files with 2 additions and 0 deletions

View File

@@ -814,6 +814,7 @@ class Tag < ApplicationRecord
self.related_tags = RelatedTagCalculator.calculate_from_sample_to_array(name).join(" ")
end
self.related_tags_updated_at = Time.now
fix_post_count if rand(post_count) <= 1
save
rescue ActiveRecord::StatementInvalid
end