def findSponsorshipFromSection()

in src/main/scala/com/gu/commercial/branding/SponsorshipHelper.scala [30:39]


  def findSponsorshipFromSection(
    section: Section,
    edition: String,
    publishedDate: Option[CapiDateTime]
  ): Option[Sponsorship] = {
    for {
      sponsorships <- section.activeSponsorships
      sponsorship <- findRelevantSponsorship(sponsorships.toSeq, edition, publishedDate)
    } yield sponsorship
  }