mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Catalogs: Fixed a problem occurring when merging comments with a custom field whose type is a list.
This commit is contained in:
commit
19a8736724
@ -4615,6 +4615,8 @@ class CatalogBuilder(object):
|
||||
index_is_id=True)
|
||||
if addendum is None:
|
||||
addendum = ''
|
||||
elif type(addendum) is list:
|
||||
addendum = (', '.join(addendum))
|
||||
include_hr = eval(self.merge_comments_rule['hr'])
|
||||
if self.merge_comments_rule['position'] == 'before':
|
||||
merged = addendum
|
||||
@ -4631,10 +4633,12 @@ class CatalogBuilder(object):
|
||||
merged += '\n'
|
||||
merged += addendum
|
||||
else:
|
||||
# Return the custom field contents
|
||||
# Return only the custom field contents
|
||||
merged = self.db.get_field(record['id'],
|
||||
self.merge_comments_rule['field'],
|
||||
index_is_id=True)
|
||||
if type(merged) is list:
|
||||
merged = (', '.join(merged))
|
||||
|
||||
return merged
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user