mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-25 11:33:10 +02:00
Fix enumeration type custom column not being merged. Fixes #1061602 (User Defined metadata/Columns not merged.)
This commit is contained in:
commit
32fd2bfbf2
1 changed files with 4 additions and 3 deletions
|
|
@ -459,9 +459,10 @@ def merge_metadata(self, dest_id, src_ids):
|
|||
if 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 db.field_metadata[key]['datatype'] == 'text' \
|
||||
and not db.field_metadata[key]['is_multiple'] \
|
||||
and not dest_value:
|
||||
if (db.field_metadata[key]['datatype'] == 'enumeration' or
|
||||
(db.field_metadata[key]['datatype'] == 'text' and
|
||||
not db.field_metadata[key]['is_multiple'])
|
||||
and not dest_value):
|
||||
db.set_custom(dest_id, src_value, num=colnum)
|
||||
if db.field_metadata[key]['datatype'] == 'text' \
|
||||
and db.field_metadata[key]['is_multiple']:
|
||||
|
|
|
|||
Loading…
Reference in a new issue