Fix merging of book records not working correctly for custom columns of type text with fixed set of permitted values. Null values were incorrectly overwriting non-null values.

Merge branch 'master' of https://github.com/cbhaley/calibre
This commit is contained in:
Kovid Goyal 2014-09-01 09:00:57 +05:30
commit f24c20c3e7

View File

@ -590,7 +590,7 @@ class EditMetadataAction(InterfaceAction):
if (dt == 'series' and not dest_value and src_value):
src_index = db.get_custom_extra(src_id, num=colnum, index_is_id=True)
db.set_custom(dest_id, src_value, num=colnum, extra=src_index)
if (dt == 'enumeration' or (dt == 'text' and not fm['is_multiple']) and not dest_value):
if ((dt == 'enumeration' or (dt == 'text' and not fm['is_multiple'])) and not dest_value):
db.set_custom(dest_id, src_value, num=colnum)
if (dt == 'text' and fm['is_multiple'] and src_value):
if not dest_value: