Only include can_have_answer if empty_box_on_unsolved is true. Thanks @SamSaffron

This commit is contained in:
David Taylor 2017-02-27 21:26:09 +00:00
parent d8f0b310f7
commit dd37edf49d
1 changed files with 4 additions and 0 deletions

View File

@ -351,6 +351,10 @@ SQL
return scope.allow_accepted_answers_on_category?(object.category_id)
end
def include_can_have_answer?
SiteSetting.empty_box_on_unsolved
end
end
TopicList.preloaded_custom_fields << "accepted_answer_post_id" if TopicList.respond_to? :preloaded_custom_fields