class Whitehall::Uploader::Finders::NewsArticleTypeFinder
  SPECIAL_CASES = {
    '' => NewsArticleType::ImportedAwaitingType
  }

  def self.find(slug, logger, line_number)
    slug ||= ''
    type = NewsArticleType.find_by_slug(slug) || SPECIAL_CASES[slug]
    logger.error "Unable to find News article type with slug '#{slug}'
    try one of (#{NewsArticleType.map(&:slug)})
    " unless type
    type
  end
end

class Whitehall::Uploader::Finders::NewsArticleTypeFinder
  SPECIAL_CASES = {
    '' => NewsArticleType::ImportedAwaitingType
  }

  def self.find(slug, logger, line_number)
    slug ||= ''
    type = NewsArticleType.find_by_slug(slug) || SPECIAL_CASES[slug]
    logger.error "Unable to find News article type with slug '#{slug}'
    try one of (#{NewsArticleType.all_slugs})
    " unless type
    type
  end
end

Fix Unable to find News article type error message
Fix Unable to find News article type error message
