-
Notifications
You must be signed in to change notification settings - Fork 3
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
i133 Ensure all data updates if an item has already been harvested #22
Conversation
Converting to draft: I discovered this introduces a bug where only a small set of data is harvested on the first harvest |
This fixes a bug where, the first time a set is harvested, none of the resource metadata gets indexed in solr. Harvesting the same set again would populate the data in solr. My best guess as to what was happening is that #find_or_create_by was creating an empty sidecar doc, which then for some reason wasn't getting updated when calling #save_and_index on its resource. Instead, I've opted to set up all the data before committing anything to the db/solr. Now, the first harvest of a set brings in the metadata as expected.
See this commit for the resolution & explanation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worked with Kiah to demo this
Ref https://github.com/harvard-lts/CURIOSity/issues/133
find_or_create_by
won't execute itsdo
block if a record is found. This was skipping the update of data for existing records. Additionally, newly added fields were not persisting on records that already existed. This PR fixes both issues