diff --git a/ifex/transformers/rule_translator.py b/ifex/transformers/rule_translator.py index 976500c..727d113 100644 --- a/ifex/transformers/rule_translator.py +++ b/ifex/transformers/rule_translator.py @@ -388,7 +388,7 @@ def transform(mapping_table, input_obj): value = transform_value_common(mapping_table, getattr_value(input_obj, input_attr), field_transform) # Set attribute unless the result was None (or sometimes due to list handling, a *list* of None values) - if value != None and (isinstance(value, list) and not all([x == None for x in value])): + if value is not None and (not isinstance(value, list) or not all(x is None for x in value)): set_attr(attributes, output_attr, value) # Mark this attribute as handled