use simple cases for small values
This commit is contained in:
parent
cdd66045e3
commit
12228a0019
@ -160,9 +160,13 @@ class VarData:
|
|||||||
Returns:
|
Returns:
|
||||||
The merged var data object.
|
The merged var data object.
|
||||||
"""
|
"""
|
||||||
all_var_datas = [self] + [
|
all_var_datas = list(filter(None, (self, *others)))
|
||||||
var_data for var_data in others if var_data is not None
|
|
||||||
]
|
if not all_var_datas:
|
||||||
|
return None
|
||||||
|
|
||||||
|
if len(all_var_datas) == 1:
|
||||||
|
return all_var_datas[0]
|
||||||
|
|
||||||
# Get the first non-empty field name or default to empty string.
|
# Get the first non-empty field name or default to empty string.
|
||||||
field_name = next(
|
field_name = next(
|
||||||
|
Loading…
Reference in New Issue
Block a user