fix: add memo to deepcopy call to avoid recursion error (#4194)
Fix deepcopy bug by passing memo to deepcopy calls in custom component
This commit is contained in:
parent
e4e1e1bd86
commit
12476648f8
2 changed files with 3 additions and 3 deletions
|
|
@ -138,8 +138,8 @@ class Component(CustomComponent):
|
|||
def __deepcopy__(self, memo):
|
||||
if id(self) in memo:
|
||||
return memo[id(self)]
|
||||
kwargs = deepcopy(self.__config)
|
||||
kwargs["inputs"] = deepcopy(self.__inputs)
|
||||
kwargs = deepcopy(self.__config, memo)
|
||||
kwargs["inputs"] = deepcopy(self.__inputs, memo)
|
||||
new_component = type(self)(**kwargs)
|
||||
new_component._code = self._code
|
||||
new_component._outputs_map = self._outputs_map
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue