Template language: Treay null author sort values the same as null author values. Fixes #887141 (Save to disk with unknown author breaks python & action fails.)

This commit is contained in:
Kovid Goyal 2011-11-08 07:53:30 +05:30
parent 1c83e0746e
commit 490d9c4b17

View File

@ -173,6 +173,8 @@ def get_components(template, mi, id, timefmt='%b %Y', length=250,
tsorder = tweaks['save_template_title_series_sorting'] tsorder = tweaks['save_template_title_series_sorting']
format_args = FORMAT_ARGS.copy() format_args = FORMAT_ARGS.copy()
format_args.update(mi.all_non_none_fields()) format_args.update(mi.all_non_none_fields())
if mi.is_null('author_sort'):
format_args['author_sort'] = _('Unknown')
if mi.title: if mi.title:
if tsorder == 'strictly_alphabetic': if tsorder == 'strictly_alphabetic':
v = mi.title v = mi.title