This reverts commit 7b6b7ca863
.
This commit is contained in:
parent
7b6b7ca863
commit
bb54270e92
|
@ -1,6 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Flag < ActiveRecord::Base
|
||||
# TODO(2025-01-15): krisk remove
|
||||
self.ignored_columns = ["custom_type"]
|
||||
|
||||
DEFAULT_VALID_APPLIES_TO = %w[Post Topic]
|
||||
MAX_SYSTEM_FLAG_ID = 1000
|
||||
MAX_NAME_LENGTH = 200
|
||||
|
@ -23,15 +26,6 @@ class Flag < ActiveRecord::Base
|
|||
Set.new(DEFAULT_VALID_APPLIES_TO | DiscoursePluginRegistry.flag_applies_to_types)
|
||||
end
|
||||
|
||||
# TODO(2025-01-15): krisk remove
|
||||
def require_message
|
||||
if ActiveRecord::Base.connection.column_exists?(:flags, :require_message)
|
||||
super
|
||||
else
|
||||
self.custom_type
|
||||
end
|
||||
end
|
||||
|
||||
def self.reset_flag_settings!
|
||||
# Flags are memoized for better performance. After the update, we need to reload them in all processes.
|
||||
PostActionType.reload_types
|
||||
|
|
Loading…
Reference in New Issue