Skip to content

Commit

Permalink
Update pydantic_extra_types/isbn.py
Browse files Browse the repository at this point in the history
  • Loading branch information
yezz123 authored Jan 2, 2024
1 parent d0c48d9 commit 2bac2dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pydantic_extra_types/isbn.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def convert_isbn10_to_isbn13(value: str) -> str:
"""

if len(value) == 10:
base_isbn = '978' + value[:-1]
base_isbn = f'978{value[:-1]}'
isbn13_digit = isbn13_digit_calc(base_isbn)
return ISBN(f'{base_isbn}{isbn13_digit}')

Expand Down

0 comments on commit 2bac2dc

Please sign in to comment.