Correct conditional branching in field search
* elastic_recheck/results.py(Hit): Simple but subtle typographical error in branching conditionals caused at_attr to be searched for in _source even if attr was already present there. Brown bag fix. Change-Id: I730f7b7c74a9d772edd0bf483f0089523cb5f6e8
This commit is contained in:
parent
29368fc2aa
commit
552edc0f8a
@ -127,7 +127,7 @@ class Hit(object):
|
||||
at_attr = "@%s" % attr
|
||||
if attr in self._hit['_source']:
|
||||
result = first(self._hit['_source'][attr])
|
||||
if at_attr in self._hit['_source']:
|
||||
elif at_attr in self._hit['_source']:
|
||||
result = first(self._hit['_source'][at_attr])
|
||||
elif attr in self._hit['_source']['@fields']:
|
||||
result = first(self._hit['_source']['@fields'][attr])
|
||||
|
Loading…
Reference in New Issue
Block a user