Skip to content

Commit

Permalink
CV2-5297: fix sentry issue (#2051)
Browse files Browse the repository at this point in the history
  • Loading branch information
melsawy authored Sep 25, 2024
1 parent 00f575f commit c166699
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/fact_check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def language_in_allowed_values
end

def rating_in_allowed_values
unless self.rating.blank?
unless self.rating.blank? || self.claim_description.nil?
team = self.claim_description.team
allowed_statuses = team.verification_statuses('media', nil)['statuses'].collect{ |s| s[:id] }
errors.add(:rating, I18n.t(:workflow_status_is_not_valid, status: self.rating, valid: allowed_statuses.join(', '))) unless allowed_statuses.include?(self.rating)
Expand Down

0 comments on commit c166699

Please sign in to comment.