safeguard on absolutify rake task
This commit is contained in:
parent
7f87825186
commit
7477a22421
1 changed files with 16 additions and 14 deletions
|
|
@ -39,6 +39,7 @@ namespace :migrations do
|
|||
require File.join(Rails.root,"config/environment")
|
||||
|
||||
Photo.all.each do |photo|
|
||||
unless photo.remote_photo_path
|
||||
# extract root
|
||||
pod_url = photo.person.url
|
||||
pod_url.chop! if pod_url[-1,1] == '/'
|
||||
|
|
@ -58,3 +59,4 @@ namespace :migrations do
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue