fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
minor fix for django 1.9
[wolnelektury.git]
/
src
/
catalogue
/
models
/
book.py
diff --git
a/src/catalogue/models/book.py
b/src/catalogue/models/book.py
index
140ba50
..
12fdb8d
100644
(file)
--- a/
src/catalogue/models/book.py
+++ b/
src/catalogue/models/book.py
@@
-195,6
+195,9
@@
class Book(models.Model):
else:
return self.media.filter(type=type_).exists()
else:
return self.media.filter(type=type_).exists()
+ def has_audio(self):
+ return self.has_media('mp3')
+
def get_media(self, type_):
if self.has_media(type_):
if type_ in Book.formats:
def get_media(self, type_):
if self.has_media(type_):
if type_ in Book.formats: