mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-07-23 17:00:41 +00:00
Make sure that debug=True
and params={'debug': True}
behaves the same way (#2442)
* Make sure that debug=True and params={'debug': True} behaves the same way * Update Documentation & Code Style * Account for the possibility of node_input being None * Fix condition * Avoid situation where params=None Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
60ff46e4e1
commit
34bca2ba83
@ -647,7 +647,12 @@ class Pipeline(BasePipeline):
|
||||
# Apply debug attributes to the node input params
|
||||
# NOTE: global debug attributes will override the value specified
|
||||
# in each node's params dictionary.
|
||||
if debug is None and node_input:
|
||||
if node_input.get("params", {}):
|
||||
debug = params.get("debug", None) # type: ignore
|
||||
if debug is not None:
|
||||
if not node_input.get("params", None):
|
||||
node_input["params"] = {}
|
||||
if node_id not in node_input["params"].keys():
|
||||
node_input["params"][node_id] = {}
|
||||
node_input["params"][node_id]["debug"] = debug
|
||||
|
Loading…
x
Reference in New Issue
Block a user