From 53b04dec5492d104f03bc8f9a939c6fdc1818742 Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Sat, 3 Jul 2010 19:39:48 +0100 Subject: [PATCH] Check that db.get_collections () exists and is callable. --- src/calibre/gui2/library/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/calibre/gui2/library/models.py b/src/calibre/gui2/library/models.py index c487a8a252..7ffbc42f02 100644 --- a/src/calibre/gui2/library/models.py +++ b/src/calibre/gui2/library/models.py @@ -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