Skip to content

Commit

Permalink
Revert "fix: adds uploader to dataset/asset"
Browse files Browse the repository at this point in the history
This reverts commit abc1f90.
  • Loading branch information
tcp committed Sep 21, 2023
1 parent abc1f90 commit 59cfe95
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions packages/syft/src/syft/service/dataset/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -155,7 +154,11 @@ def _repr_html_(self) -> Any:
# relative
from ...service.action.action_object import ActionObject

uploaded_by_line = f"<p><strong>Uploaded by: </strong>{self.uploader.name} ({self.uploader.email})</p>" if self.uploader else ""
uploaded_by_line = "n/a"
if len(self.contributors) > 0:
uploaded_by_line = (
f"<p><strong>Uploaded by: </strong>{self.uploader.name}</p>"
)
if isinstance(self.data, ActionObject):
data_table_line = itables.to_html_datatable(
df=self.data.syft_action_data, css=itables_css
Expand Down Expand Up @@ -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."
)
Expand Down Expand Up @@ -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 = (
"<p class='paragraph-sm'><strong>"
+ f"<span class='pr-8'>Uploaded by:</span></strong>{self.uploader.name} ({self.uploader.email})</p>"
) if self.uploader else ""

+ f"<span class='pr-8'>Uploaded by:</span></strong>{self.uploader.name}</p>"
)
return f"""
<style>
{fonts_css}
Expand Down Expand Up @@ -618,8 +620,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}' Dataset."
)
Expand Down

0 comments on commit 59cfe95

Please sign in to comment.