mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Back out the models 'strip' change
This commit is contained in:
parent
b2d5f740b5
commit
232ce4748d
@ -36,7 +36,7 @@ field_metadata = FieldMetadata()
|
||||
class SafeFormat(TemplateFormatter):
|
||||
def get_value(self, key, args, mi):
|
||||
try:
|
||||
ign, v = mi.format_field(key, series_with_index=False)
|
||||
ign, v = mi.format_field(key.lower(), series_with_index=False)
|
||||
if v is None:
|
||||
return ''
|
||||
if v == '':
|
||||
|
@ -724,7 +724,7 @@ class BooksModel(QAbstractTableModel): # {{{
|
||||
elif typ == 'series':
|
||||
val, s_index = parse_series_string(self.db, label, value.toString())
|
||||
elif typ == 'composite':
|
||||
tmpl = unicode(value.toString()).lower().strip()
|
||||
tmpl = unicode(value.toString()).strip()
|
||||
disp = cc['display']
|
||||
disp['composite_template'] = tmpl
|
||||
self.db.set_custom_column_metadata(cc['colnum'], display = disp)
|
||||
|
@ -108,8 +108,8 @@ class SafeFormat(TemplateFormatter):
|
||||
'''
|
||||
def get_value(self, key, args, kwargs):
|
||||
try:
|
||||
if kwargs[key]:
|
||||
return kwargs[key]
|
||||
if kwargs[key.lower()]:
|
||||
return kwargs[key.lower()]
|
||||
return ''
|
||||
except:
|
||||
return ''
|
||||
|
Loading…
x
Reference in New Issue
Block a user