mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-03-01 09:11:06 +00:00
Don't crash on books with no isbn
This commit is contained in:
parent
095b60bff1
commit
a31d05c694
1 changed files with 4 additions and 2 deletions
|
@ -240,7 +240,9 @@ class Edition(Book):
|
||||||
self.isbn_13 = isbn_10_to_13(self.isbn_10)
|
self.isbn_13 = isbn_10_to_13(self.isbn_10)
|
||||||
|
|
||||||
# normalize isbn format
|
# normalize isbn format
|
||||||
|
if self.isbn_10:
|
||||||
self.isbn_10 = re.sub(r"[^0-9X]", "", self.isbn_10)
|
self.isbn_10 = re.sub(r"[^0-9X]", "", self.isbn_10)
|
||||||
|
if self.isbn_13:
|
||||||
self.isbn_13 = re.sub(r"[^0-9X]", "", self.isbn_13)
|
self.isbn_13 = re.sub(r"[^0-9X]", "", self.isbn_13)
|
||||||
|
|
||||||
# set rank
|
# set rank
|
||||||
|
|
Loading…
Reference in a new issue