Check that db.get_collections () exists and is callable.

This commit is contained in:
Charles Haley 2010-07-03 19:39:48 +01:00
parent 87555b2c4d
commit 53b04dec54

View File

@ -937,6 +937,7 @@ class DeviceBooksModel(BooksModel): # {{{
cname = self.column_map[index.column()]
if cname in ('title', 'authors') or \
(cname == 'collections' and \
callable(getattr(self.db, 'supports_collections', None)) and \
self.db.supports_collections() and \
prefs['preserve_user_collections']):
flags |= Qt.ItemIsEditable