-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
The verify_url method of the pid.rb object was not updated to reflect changes made to the ORM mappings between pid.rb and invalid_url.rb. The relationship of the foreign key between the two entities was changed. The old structure had the invalid_url on pid as a foreign key relationship. This was updated so that the invalid_url now has a pid_id foreign key.
The offending code is:
if res.code.to_i >= 300 and res.code.to_i != 302
self.invalid_url_report = InvalidUrlReport.new(:http_code => res.code.to_i, :last_checked => Time.now)
else
self.invalid_url_report = nil
endIt should probably be updated to:
if res.code.to_i >= 300 and res.code.to_i != 302
iur = InvalidUrlReport.new(:pid => self, :http_code => res.code.to_i, :last_checked => Time.now)
iur.save
else
iur = InvalidUrlReport.findByPid(:pid => self)
iur.destroy unless iur.nil?
endMetadata
Metadata
Assignees
Labels
No labels