FIX: check if add_post_custom_fields_allowlister exisits

This commit is contained in:
Krzysztof Kotlarek 2020-07-27 12:04:28 +10:00
parent 39c326d648
commit 36579b774f
1 changed files with 3 additions and 3 deletions

View File

@ -251,12 +251,12 @@ SQL
end
# TODO Drop after Discourse 2.6.0 release
if TopicView.respond_to?(:add_post_custom_fields_whitelister)
TopicView.add_post_custom_fields_whitelister do |user|
if TopicView.respond_to?(:add_post_custom_fields_allowlister)
TopicView.add_post_custom_fields_allowlister do |user|
["is_accepted_answer"]
end
else
TopicView.add_post_custom_fields_allowlister do |user|
TopicView.add_post_custom_fields_whitelister do |user|
["is_accepted_answer"]
end
end