diff --git a/packages/syft/src/syft/service/dataset/dataset.py b/packages/syft/src/syft/service/dataset/dataset.py index 84856a9ce16..e9da25cbb45 100644 --- a/packages/syft/src/syft/service/dataset/dataset.py +++ b/packages/syft/src/syft/service/dataset/dataset.py @@ -21,7 +21,6 @@ from result import Err from result import Ok from result import Result -from syft.service.user.roles import Roles # relative from ...serde.serializable import serializable @@ -155,7 +154,11 @@ def _repr_html_(self) -> Any: # relative from ...service.action.action_object import ActionObject - uploaded_by_line = f"

Uploaded by: {self.uploader.name} ({self.uploader.email})

" if self.uploader else "" + uploaded_by_line = "n/a" + if len(self.contributors) > 0: + uploaded_by_line = ( + f"

Uploaded by: {self.uploader.name}

" + ) if isinstance(self.data, ActionObject): data_table_line = itables.to_html_datatable( df=self.data.syft_action_data, css=itables_css @@ -333,8 +336,6 @@ def add_contributor( name=name, role=_role_str, email=email, phone=phone, note=note ) self.contributors.append(contributor) - if _role_str == Roles.UPLOADER.value: - self.uploader = contributor return SyftSuccess( message=f"Contributor '{name}' added to '{self.name}' Asset." ) @@ -450,11 +451,12 @@ def _coll_repr_(self) -> Dict[str, Any]: } def _repr_html_(self) -> Any: - uploaded_by_line = ( + uploaded_by_line = "n/a" + if len(self.contributors) > 0: + uploaded_by_line = ( "

" - + f"Uploaded by:{self.uploader.name} ({self.uploader.email})

" - ) if self.uploader else "" - + + f"Uploaded by:{self.uploader.name}

" + ) return f"""