[formatter] use value of last alternative (#4492)
fixes {fieldname|''} evaluating to the value of 'keywords-default'
instead of an empty string
This commit is contained in:
@@ -182,9 +182,10 @@ class StringFormatter():
|
||||
if obj:
|
||||
break
|
||||
except Exception:
|
||||
pass
|
||||
obj = None
|
||||
else:
|
||||
obj = self.default
|
||||
if obj is None:
|
||||
obj = self.default
|
||||
return fmt(obj)
|
||||
return wrap
|
||||
|
||||
|
||||
Reference in New Issue
Block a user