diff --git a/.github/changes-filter.yaml b/.github/changes-filter.yaml index 831a028a9d91..5efcb44e0564 100644 --- a/.github/changes-filter.yaml +++ b/.github/changes-filter.yaml @@ -45,6 +45,7 @@ components: - "src/frontend/tests/extended/integrations/**" - "src/frontend/tests/extended/features/**" - "src/frontend/tests/extended/regression/**" + - "src/backend/base/langflow/custom/**" workspace: - "src/backend/base/langflow/inputs/**" diff --git a/src/backend/base/langflow/custom/custom_component/component.py b/src/backend/base/langflow/custom/custom_component/component.py index cd950a85f66b..639dbc240f1e 100644 --- a/src/backend/base/langflow/custom/custom_component/component.py +++ b/src/backend/base/langflow/custom/custom_component/component.py @@ -957,19 +957,19 @@ def _build_artifact(self, result): custom_repr = str(custom_repr) raw = self._process_raw_result(result) - artifact_type = get_artifact_type(raw or self.status, result) + artifact_type = get_artifact_type(self.status or raw, result) raw, artifact_type = post_process_raw(raw, artifact_type) return {"repr": custom_repr, "raw": raw, "type": artifact_type} def _process_raw_result(self, result): - if hasattr(result, "data"): + if self.status: + raw = self.status + elif hasattr(result, "data"): raw = result.data elif hasattr(result, "model_dump"): raw = result.model_dump() elif isinstance(result, dict | Data | str): raw = result.data if isinstance(result, Data) else result - elif self.status: - raw = self.status else: raw = result return raw