Skip to content

Instantly share code, notes, and snippets.

@vassyz
Created October 3, 2023 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vassyz/3e9e79daa95c40410baf675e418be9c6 to your computer and use it in GitHub Desktop.
Save vassyz/3e9e79daa95c40410baf675e418be9c6 to your computer and use it in GitHub Desktop.
[DfE] 2237-withdrawn-course-in-apply
course = RecruitmentCycle.next.providers.find_by(provider_code: "C23").courses.find_by(course_code: "CX11")
course.enrichments.max_by(&:created_at).update(status: "draft", last_published_timestamp_utc: nil)
course.site_statuses.each do |site_status|
site_status.update(vac_status: :no_vacancies, status: :new_status)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment