mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-01-12 10:15:29 +00:00
Merge pull request #1172 from bookwyrm-social/import-lookup
Don't try title/author search when isbn search fails
This commit is contained in:
commit
6d42f2bb1e
1 changed files with 6 additions and 1 deletions
|
@ -75,7 +75,12 @@ class ImportItem(models.Model):
|
||||||
|
|
||||||
def resolve(self):
|
def resolve(self):
|
||||||
"""try various ways to lookup a book"""
|
"""try various ways to lookup a book"""
|
||||||
self.book = self.get_book_from_isbn() or self.get_book_from_title_author()
|
if self.isbn:
|
||||||
|
self.book = self.get_book_from_isbn()
|
||||||
|
else:
|
||||||
|
# don't fall back on title/author search is isbn is present.
|
||||||
|
# you're too likely to mismatch
|
||||||
|
self.get_book_from_title_author()
|
||||||
|
|
||||||
def get_book_from_isbn(self):
|
def get_book_from_isbn(self):
|
||||||
"""search by isbn"""
|
"""search by isbn"""
|
||||||
|
|
Loading…
Reference in a new issue