Permalink
Browse files

Warn, don't die on unknown slug

  • Loading branch information...
1 parent f95077d commit 54e80715d0dfebd81922c0540dcc8596e0aa0d1e @jamiecobbett jamiecobbett committed Oct 1, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/tasks/move_to_new_sections.rake
View
4 lib/tasks/move_to_new_sections.rake
@@ -69,8 +69,8 @@ module NewSectionMigration
clean_slug = clean_slug(row[1])
a = Artefact.where(slug: clean_slug).first
if a.nil?
- puts row
- raise "Stop! Artefact '#{clean_slug}' could not be found."
+ puts "Had to ignore Artefact '#{clean_slug}' - could not be found. It's probably been renamed."
+ next
end
row.shift # remove the artefact title
row.shift # remove the artefact slug

0 comments on commit 54e8071

Please sign in to comment.