fix: artifact repr assignment (#5829)
Co-authored-by: xuyingjie <xuyingjie@unipus.cn> Co-authored-by: anovazzi1 <otavio2204@gmail.com>
This commit is contained in:
parent
c904d9caf6
commit
ae7b30c632
1 changed files with 5 additions and 1 deletions
|
|
@ -950,7 +950,11 @@ class Component(CustomComponent):
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def _build_artifact(self, result):
|
def _build_artifact(self, result):
|
||||||
custom_repr = self.custom_repr() or (result if isinstance(result, dict | Data | str) else str(result))
|
custom_repr = self.custom_repr()
|
||||||
|
if custom_repr is None and isinstance(result, dict | Data | str):
|
||||||
|
custom_repr = result
|
||||||
|
if not isinstance(custom_repr, str):
|
||||||
|
custom_repr = str(custom_repr)
|
||||||
|
|
||||||
raw = self._process_raw_result(result)
|
raw = self._process_raw_result(result)
|
||||||
artifact_type = get_artifact_type(self.status or raw, result)
|
artifact_type = get_artifact_type(self.status or raw, result)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue