Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

duplicate_url_reporter.rb still uses old pid <-- duplicate_url table mapping #4

Open
briri opened this issue Jun 16, 2015 · 0 comments
Assignees

Comments

@briri
Copy link
Member

briri commented Jun 16, 2015

The duplicate_url_reporter.rb was not updated to reflect changes made to the ORM mappings between pid.rb and duplicate_url.rb. The relationship of the foreign key between the two entities was changed. The old structure had the duplicate_url_id on pid as a foreign key relationship. This was updated so that the duplicate_url now has a pid_id foreign key.

The offending code is:

          pid.mutable = true
          pid.duplicate_url_report = DuplicateUrlReport.new(:other_pids => pids.join(', '), :last_checked => Time.now)
          pid.save
          pid.mutable = false

It should probably be updated to:

          dur = DuplicateUrlReport.new(:pid => pid, :other_pids => pids.join(', '), :last_checked => Time.now)
          dur.save
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants