Skip to content

Commit

Permalink
Add support for channel to create_claim_description_and_fact_check
Browse files Browse the repository at this point in the history
Add support for `channel` to `create_claim_description_and_fact_check`
  • Loading branch information
jayjay-w committed Feb 19, 2025
1 parent c79a161 commit 8c55562
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/concerns/project_media_creators.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def create_claim_description_and_fact_check
fc = nil
unless self.set_fact_check.blank?
fact_check = self.set_fact_check.with_indifferent_access
fact_check['channel'] ||= (User.current && User.current.is_a?(BotUser)) ? 'api' : 'manual'
fc = FactCheck.create!({
title: fact_check['title'],
summary: fact_check['summary'],
Expand All @@ -27,6 +28,7 @@ def create_claim_description_and_fact_check
report_status: (fact_check['publish_report'] ? 'published' : 'unpublished'),
rating: self.set_status,
tags: self.set_tags.to_a.map(&:strip),
channel: fact_check['channel'],
skip_check_ability: true
})
end
Expand Down

0 comments on commit 8c55562

Please sign in to comment.