1
0
mirror of https://gitlab.crans.org/mediatek/med.git synced 2025-07-08 14:50:20 +02:00

Import vinyles

This commit is contained in:
Yohann D'ANELLO
2020-05-22 22:15:37 +02:00
parent 50f3cf39c1
commit d88fccb51d
3 changed files with 53 additions and 3 deletions

View File

@ -41,7 +41,7 @@ class Command(BaseCommand):
self.stdout.write(self.style.SUCCESS(
"Medium with ISBN {isbn} successfully imported"
.format(isbn=isbn)))
except ValidationError as e:
except (ValidationError, ValueError) as e:
self.stderr.write(self.style.WARNING(
"An error occured while importing ISBN {isbn}: {error}"
.format(isbn=isbn, error=e.message)))
.format(isbn=isbn, error=str(e))))