fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added a test
[wolnelektury.git]
/
apps
/
catalogue
/
utils.py
diff --git
a/apps/catalogue/utils.py
b/apps/catalogue/utils.py
index
02e5b6d
..
368f96d
100644
(file)
--- a/
apps/catalogue/utils.py
+++ b/
apps/catalogue/utils.py
@@
-49,13
+49,13
@@
class ExistingFile(UploadedFile):
class BookImportDocProvider(DocProvider):
class BookImportDocProvider(DocProvider):
- """
used for joined EPUBs
"""
+ """
Used for joined EPUB and PDF files.
"""
def __init__(self, book):
self.book = book
def __init__(self, book):
self.book = book
-
+
def by_slug(self, slug):
if slug == self.book.slug:
return self.book.xml_file
else:
def by_slug(self, slug):
if slug == self.book.slug:
return self.book.xml_file
else:
- return
Book
.objects.get(slug=slug).xml_file
+ return
type(self.book)
.objects.get(slug=slug).xml_file