revert: update components filter and build artifact logic (#6022)

This commit is contained in:
Cristhian Zanforlin Lousa 2025-01-30 08:40:00 -03:00 committed by GitHub
commit e09d3fe0bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View file

@ -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/**"

View file

@ -957,19 +957,19 @@ class Component(CustomComponent):
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