mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Compare against None rather than basing off anything that evaluates true
This commit is contained in:
parent
be9e00f316
commit
529f4f6ae2
@ -408,7 +408,7 @@ class Merger(object):
|
||||
crd[ret[nk]] = []
|
||||
crd[ret[nk]].append(ret[self.num_fields-1])
|
||||
else:
|
||||
if not self.ignore_null or ret[self.num_fields-1]:
|
||||
if not self.ignore_null or ret[self.num_fields-1] is not None:
|
||||
crd[ret[nk]] = ret[self.num_fields-1]
|
||||
else:
|
||||
# Otherwise, the field name is the key but we have a spare.
|
||||
@ -442,7 +442,7 @@ class Merger(object):
|
||||
else:
|
||||
crd[nk] = [crd[nk], ret[i]]
|
||||
else:
|
||||
if not self.ignore_null or ret[i]:
|
||||
if not self.ignore_null or ret[i] is not None:
|
||||
crd[nk] = ret[i]
|
||||
# Get key list and work backwards. This is inner-out processing
|
||||
ks = list(listify_dicts.keys())
|
||||
|
Loading…
Reference in New Issue
Block a user