mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-24 17:28:58 +01: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
1 changed files with 5 additions and 1 deletions
|
|
@ -4615,6 +4615,8 @@ def merge_comments(self, record):
|
|||
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 @@ def merge_comments(self, record):
|
|||
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…
Reference in a new issue