Skip to content

Commit 6b4cdf9

Browse files
committed
fix: common params
1 parent 85a75c8 commit 6b4cdf9

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

scrapegraphai/nodes/base_node.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,11 @@ def update_config(self, params: dict, overwrite: bool = False):
8888
param (dict): The dictionary to update node_config with.
8989
overwrite (bool): Flag indicating if the values of node_config should be overwritten if their value is not None.
9090
"""
91-
if self.node_config is None:
92-
self.node_config = {}
91+
9392
for key, val in params.items():
94-
if hasattr(self, key) and (key not in self.node_config or overwrite):
95-
self.node_config[key] = val
96-
setattr(self, key, val)
93+
if hasattr(self, key) and not overwrite:
94+
continue
95+
setattr(self, key, val)
9796

9897
def get_input_keys(self, state: dict) -> List[str]:
9998
"""

0 commit comments

Comments
 (0)