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 e720a6e commit d0c48d9
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 @@ -101,7 +101,7 @@ def validate_isbn_format(value: str) -> None:
if isbn10_digit_calc(value) != value[-1]:
raise PydanticCustomError('isbn_invalid_digit_check_isbn10', 'Provided digit is invalid for given ISBN')

if isbn_length == 13:
elif isbn_length == 13:
if not value.isdigit():
raise PydanticCustomError('isbn13_invalid_characters', 'All digits of ISBN-13 must be integers')
if value[:3] not in ('978', '979'):
Expand Down

0 comments on commit d0c48d9

Please sign in to comment.