Skip to content

Commit

Permalink
Preclude category topics from qa_enabled check
Browse files Browse the repository at this point in the history
  • Loading branch information
angusmcleod committed Jun 15, 2018
1 parent f7cdaed commit badb7fa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/qa_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module QAHelper
class << self
def qa_enabled(topic)
return false if !SiteSetting.qa_enabled
return false if topic.is_category_topic?

tags = topic.tags.map(&:name)
has_qa_tag = !(tags & SiteSetting.qa_tags.split('|')).empty?
is_qa_category = topic.category && topic.category.custom_fields["qa_enabled"]
Expand Down

0 comments on commit badb7fa

Please sign in to comment.