Skip to content
Snippets Groups Projects
Commit 825f0563 authored by Israel Barreto Sant'Anna's avatar Israel Barreto Sant'Anna
Browse files

Fix nil learning object error on check_links task

parent bc4bcb59
No related branches found
No related tags found
No related merge requests found
......@@ -53,7 +53,7 @@ require 'fileutils'
if att_url.blank?
p "-----------------------------------------------------"
p "Retrieve URL nil"
p "LearningObject id: #{att.learning_object.id}"
p "LearningObject id: #{att.learning_object.id}" if !att.learning_object.nil?
p "Attachment id: #{att.id}, id_dspace: #{att.id_dspace}"
else
begin
......@@ -61,7 +61,7 @@ require 'fileutils'
rescue URI::InvalidURIError
p "-----------------------------------------------------"
p "Invalid URI: #{att_url}"
p "LearningObject id: #{att.learning_object.id}"
p "LearningObject id: #{att.learning_object.id}" if !att.learning_object.nil?
p "Attachment id: #{att.id}, id_dspace: #{att.id_dspace}"
next
end
......@@ -71,7 +71,7 @@ require 'fileutils'
p "-----------------------------------------------------"
p "Response != 200: #{response.inspect}"
p "Link: #{att_url}"
p "LearningObject id: #{att.learning_object.id}"
p "LearningObject id: #{att.learning_object.id}" if !att.learning_object.nil?
p "Attachment id: #{att.id}, id_dspace: #{att.id_dspace}"
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment