mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Check that db.get_collections () exists and is callable.
This commit is contained in:
parent
87555b2c4d
commit
53b04dec54
@ -937,6 +937,7 @@ class DeviceBooksModel(BooksModel): # {{{
|
|||||||
cname = self.column_map[index.column()]
|
cname = self.column_map[index.column()]
|
||||||
if cname in ('title', 'authors') or \
|
if cname in ('title', 'authors') or \
|
||||||
(cname == 'collections' and \
|
(cname == 'collections' and \
|
||||||
|
callable(getattr(self.db, 'supports_collections', None)) and \
|
||||||
self.db.supports_collections() and \
|
self.db.supports_collections() and \
|
||||||
prefs['preserve_user_collections']):
|
prefs['preserve_user_collections']):
|
||||||
flags |= Qt.ItemIsEditable
|
flags |= Qt.ItemIsEditable
|
||||||
|
Loading…
x
Reference in New Issue
Block a user