Extra robustness

This commit is contained in:
Kovid Goyal 2014-11-06 13:03:29 +05:30
parent 170c7f91a6
commit dbdf7e91b2

View File

@ -1576,8 +1576,10 @@ class DeviceBooksModel(BooksModel): # {{{
return (_('Waiting for metadata to be updated'))
if self.is_row_marked_for_deletion(row):
return (_('Marked for deletion'))
if cname in ['title', 'authors'] or (cname == 'collections' and
self.db.supports_collections()):
if cname in ['title', 'authors'] or (
cname == 'collections' and (
callable(getattr(self.db, 'supports_collections', None)) and self.db.supports_collections())
):
return (_("Double click to <b>edit</b> me<br><br>"))
elif role == Qt.DecorationRole and cname == 'inlibrary':
if hasattr(self.db[self.map[row]], 'in_library_waiting'):