mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-13 03:36:35 +00:00
Fixes setting book results from title/author search
This commit is contained in:
parent
eabe886347
commit
6301656a0e
1 changed files with 2 additions and 1 deletions
|
@ -71,6 +71,7 @@ class ImportItem(models.Model):
|
||||||
index = models.IntegerField()
|
index = models.IntegerField()
|
||||||
data = models.JSONField()
|
data = models.JSONField()
|
||||||
book = models.ForeignKey(Book, on_delete=models.SET_NULL, null=True, blank=True)
|
book = models.ForeignKey(Book, on_delete=models.SET_NULL, null=True, blank=True)
|
||||||
|
book_guess = models.ForeignKey(Book, on_delete=models.SET_NULL, null=True, blank=True)
|
||||||
fail_reason = models.TextField(null=True)
|
fail_reason = models.TextField(null=True)
|
||||||
|
|
||||||
def resolve(self):
|
def resolve(self):
|
||||||
|
@ -80,7 +81,7 @@ class ImportItem(models.Model):
|
||||||
else:
|
else:
|
||||||
# don't fall back on title/author search is isbn is present.
|
# don't fall back on title/author search is isbn is present.
|
||||||
# you're too likely to mismatch
|
# you're too likely to mismatch
|
||||||
self.get_book_from_title_author()
|
self.book = 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