-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Re-enabled autofill on add new book form #8688
Conversation
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.
Thanks, @shivam200446.
Instead of changing i.title
to i.book_title
throughout the code, please set i.title = i.book_title
like I asked. You can do this on line 229, right after i
is defined.
@@ -311,7 +312,7 @@ def find_matches( | |||
return edition or work # Case 3 or 2, from check page | |||
|
|||
edition = self.try_edition_match( | |||
title=i.title, | |||
title=i.book_title, |
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.
title=i.book_title, | |
title=i.title, |
@@ -325,7 +326,7 @@ def find_matches( | |||
solr = get_solr() | |||
# Less exact solr search than try_edition_match(), search by supplied title and author only. | |||
result = solr.select( | |||
{'title': i.title, 'author_key': author_key.split("/")[-1]}, | |||
{'title': i.book_title, 'author_key': author_key.split("/")[-1]}, |
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.
{'title': i.book_title, 'author_key': author_key.split("/")[-1]}, | |
{'title': i.title, 'author_key': author_key.split("/")[-1]}, |
@@ -458,7 +459,7 @@ def no_match(self, saveutil: DocSaveHelper, i: web.utils.Storage) -> NoReturn: | |||
""" | |||
# Any new author has been created and added to | |||
# saveutil, and author_key added to i | |||
work = new_doc("/type/work", title=i.title, authors=i.authors) | |||
work = new_doc("/type/work", title=i.book_title, authors=i.authors) |
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.
work = new_doc("/type/work", title=i.book_title, authors=i.authors) | |
work = new_doc("/type/work", title=i.title, authors=i.authors) |
for more information, see https://pre-commit.ci
Sorry for inconvenience! |
No worries! Thanks for making those changes. |
Closes #8598
Technical
updated
book_title
as the newname
Added
book_title=""
as object to post handler and set the value ofi.title
toi.book_title
Testing
Screenshot
Stakeholders