posts: fix is_taken_down flag.

The second bit of the `bit_flags` field was previously used for the
`has_cropped` flag, which is still set on many posts, so it's not safe
to reuse it for the `is_taken_down flag.
This commit is contained in:
evazion
2022-05-03 06:48:29 -05:00
parent 2219a64f47
commit d511a6b6cf

View File

@@ -11,7 +11,7 @@ class Post < ApplicationRecord
RESTRICTED_TAGS_REGEX = /(?:^| )(?:#{Danbooru.config.restricted_tags.join("|")})(?:$| )/o
deletable
has_bit_flags %w[has_embedded_notes is_taken_down]
has_bit_flags %w[has_embedded_notes _unused_has_cropped is_taken_down]
normalize :source, :normalize_source
before_validation :merge_old_changes