fix emmpty input in graph (#1560)

### What problem does this PR solve?

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu 2024-07-17 11:33:49 +08:00 committed by GitHub
parent baeedc699d
commit b06957e561
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -456,12 +456,17 @@ class ComponentBase(ABC):
break
break
if self.component_name.lower().find("answer") >= 0:
if self.get_component_name(u) in ["relevant"]: continue
else: upstream_outs.append(self._canvas.get_component(u)["obj"].output(allow_partial=False)[1])
if self.get_component_name(u) in ["relevant"]:
continue
else:
o = self._canvas.get_component(u)["obj"].output(allow_partial=False)[1]
if o is not None:
upstream_outs.append(o)
break
return pd.concat(upstream_outs, ignore_index=False)
if upstream_outs:
return pd.concat(upstream_outs, ignore_index=False)
return pd.DataFrame()
def get_stream_input(self):
reversed_cpnts = []