Skip to content

Commit 599cb17

Browse files
authored
Overwrite db/data/dfe-schools.zip (#3393)
When downloading the latest version of the schools data we should make sure to overwrite the version already contained in the repo otherwise running, for example, `schools:import` will use the file in the repo and not the latest version just downloaded.
2 parents 8e0baef + b974e66 commit 599cb17

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/tasks/schools.rake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ namespace :schools do
4545
download_button = download_form.button_with(value: "Results.zip")
4646
puts "'Results.zip' link found, downloading the file..."
4747
download_file = agent.click(download_button)
48-
download_file.save("db/data/dfe-schools.zip")
48+
puts "Overwriting db/data/dfe-schools.zip"
49+
download_file.save!("db/data/dfe-schools.zip")
4950
puts "File downloaded successfully to db/data/dfe-schools.zip"
5051
else
5152
puts "Download button never appeared, aborting"

0 commit comments

Comments
 (0)