utils: add a notempty transformation for attribute mappings (fixes #19233)
This commit is contained in:
parent
0597b3e27e
commit
39ea7fb75c
|
@ -87,6 +87,8 @@ def mapping_to_value(mapping, user_info):
|
|||
elif mapping['translation'] == 'simple':
|
||||
value = mapping['translation_simple'].get(
|
||||
value, mapping.get('translation_simple_default', ''))
|
||||
elif mapping['translation'] == 'notempty':
|
||||
value = bool(value)
|
||||
else:
|
||||
raise NotImplementedError
|
||||
return value
|
||||
|
|
Loading…
Reference in New Issue