X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/67153f475c15e082ef89d3d4b475a83d59706e56..24a30f976686c4d183c1bd09cdae95c15a7b8dae:/apps/catalogue/models.py diff --git a/apps/catalogue/models.py b/apps/catalogue/models.py index b78b5939b..00baa287e 100644 --- a/apps/catalogue/models.py +++ b/apps/catalogue/models.py @@ -160,7 +160,10 @@ def book_upload_path(ext=None, maxlen=100): def get_dynamic_path(media, filename, ext=ext): # how to put related book's slug here? if not ext: - ext = media.type + if media.type == 'daisy': + ext = 'daisy.zip' + else: + ext = media.type if not media.name: name = slughifi(filename.split(".")[0]) else: