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
Create SolrHelper module. #15284
Create SolrHelper module. #15284
Conversation
end | ||
|
||
def update_document_type_user(db_id, solr_id) | ||
db_user = DASHBOARD_DB[:users].find_by_id(db_id) |
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.
The bug fix is here, this should be using the where
syntax.
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.
it's not clear to me why where().first
is better than find
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.
Because find
is ActiveRecord syntax, not Sinatra syntax. Though I'd consider it less readable as corrected, it works this way. :)
Note that I'm choosing not to put this in |
I dont have much/any expertise in this area of the code, but change looks fine to me. |
end | ||
|
||
def update_document_type_user(db_id, solr_id) | ||
db_user = DASHBOARD_DB[:users].find_by_id(db_id) |
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.
it's not clear to me why where().first
is better than find
Mostly a copy-and-paste, with a bug fix as well. This PR is motivated by wanting access to the
delete_document
method from #15210.