1
0
Fork 0

merge latest changes and add tests

This commit is contained in:
Hugh Rundle 2024-06-30 18:54:59 +10:00
parent e5b260e3ee
commit 06d6360082
No known key found for this signature in database
GPG key ID: A7E35779918253F9
8 changed files with 241 additions and 32 deletions

View file

@ -16,6 +16,7 @@ from django.views import View
from bookwyrm import forms, models
from bookwyrm.importers import (
BookwyrmImporter,
BookwyrmBooksImporter,
CalibreImporter,
LibrarythingImporter,
GoodreadsImporter,
@ -105,8 +106,8 @@ class Import(View):
request.user,
TextIOWrapper(request.FILES["csv_file"], encoding=importer.encoding),
include_reviews,
create_shelves,
privacy,
create_shelves,
)
except (UnicodeDecodeError, ValueError, KeyError):
return self.get(request, invalid=True)