X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/2b447a437065ce4bd982562f6fd0c2877074c2da..6034428b14b634d1801e2d8279b1a0863b918a48:/src/catalogue/fields.py?ds=inline diff --git a/src/catalogue/fields.py b/src/catalogue/fields.py index ebe4df17e..2b2d6a6da 100644 --- a/src/catalogue/fields.py +++ b/src/catalogue/fields.py @@ -106,7 +106,7 @@ class BuildEbook(Task): def build(self, fieldfile): book = fieldfile.instance out = self.transform(book.wldocument(), fieldfile) - fieldfile.save(None, File(open(out.get_filename())), save=False) + fieldfile.save(None, File(open(out.get_filename(), 'rb')), save=False) self.set_file_permissions(fieldfile) if book.pk is not None: books = type(book).objects.filter(pk=book.pk)