1
0
mirror of https://gitlab.crans.org/mediatek/med.git synced 2025-07-07 16:28:32 +02:00

Fix openlibrary scrap, fix linters

This commit is contained in:
Yohann D'ANELLO
2020-05-12 14:56:31 +02:00
parent 8e39f6039e
commit aa9b69f2d6
5 changed files with 32 additions and 12 deletions

View File

@ -8,7 +8,6 @@ Based on https://github.com/secnot/django-isbn-field
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
from stdnum import isbn
def isbn_validator(raw_isbn):
@ -21,7 +20,7 @@ def isbn_validator(raw_isbn):
if len(isbn_to_check) != 10 and len(isbn_to_check) != 13:
raise ValidationError(_('Invalid ISBN: Wrong length'))
#if not isbn.is_valid(isbn_to_check):
# if not isbn.is_valid(isbn_to_check):
# raise ValidationError(_('Invalid ISBN: Failed checksum'))
if isbn_to_check != isbn_to_check.upper():