mirror of
https://github.com/JonathanHerrewijnen/calibre-web.git
synced 2024-11-14 07:03:50 +00:00
use isinstance instead of type
This commit is contained in:
parent
fb41aa8b57
commit
6b4d7674b5
@ -477,7 +477,7 @@ def yesno(value, yes, no):
|
||||
@app.template_filter('canread')
|
||||
@app.template_test('canread')
|
||||
def canread(ext):
|
||||
if type(ext) == db.Data:
|
||||
if isinstance(ext, db.Data):
|
||||
ext = ext.format
|
||||
return ext.lower() in READER_EXTENSIONS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user