View Single Post
Old 05-14-2017, 08:13 AM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,423
Karma: 27757236
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Doesn't putting it in there mean that it will no longer be copied at all by smart_update(). That is likely to have rather far reaching consequences. A more localized fix would probably be to change the update() book method to preserve the contents of that field instead. Something like
Code:
dc = getattr(book, 'device_collections', None)
book.smart_update()
if not getattr(book, 'device_collections', None):
    book.device_collections = dc
kovidgoyal is offline   Reply With Quote