Skip to content

Commit

Permalink
ISBN: Fixed Cov
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmucidas committed Dec 28, 2023
1 parent bdc75f4 commit 60b6cd7
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions pydantic_extra_types/isbn.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,6 @@ def validate_isbn_digits(value: str) -> None:

isbn_length = len(value)

if isbn_length not in (10, 13):
raise PydanticCustomError('isbn_length', f'Length for ISBN must be 10 or 13 digits, not {isbn_length}')

validation_functions = {10: isbn10_digit_calc, 13: isbn13_digit_calc}
validate = validation_functions.get(isbn_length)

Expand Down

0 comments on commit 60b6cd7

Please sign in to comment.