use isinstance instead of type

parent fb41aa8b
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment