mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 18:43:39 +02:00
Remove redundant code in format_field_extended
This commit is contained in:
parent
ee82fdac05
commit
6e61999cc4
1 changed files with 2 additions and 6 deletions
|
|
@ -647,14 +647,10 @@ def format_field_extended(self, key, series_with_index=True):
|
|||
return (unicode(cmeta['name']+'_index'), '', '', cmeta)
|
||||
|
||||
if key in self.custom_field_keys():
|
||||
res = self.get(key, None)
|
||||
res = self.get(key, None) # get evaluates all necessary composites
|
||||
cmeta = self.get_user_metadata(key, make_copy=False)
|
||||
name = unicode(cmeta['name'])
|
||||
if cmeta['datatype'] != 'composite' and (res is None or res == ''):
|
||||
return (name, res, None, None)
|
||||
orig_res = res
|
||||
cmeta = self.get_user_metadata(key, make_copy=False)
|
||||
if res is None or res == '':
|
||||
if res is None or res == '': # can't check "not res" because of numeric fields
|
||||
return (name, res, None, None)
|
||||
orig_res = res
|
||||
datatype = cmeta['datatype']
|
||||
|
|
|
|||
Loading…
Reference in a new issue