Skip to content

Commit d26e911

Browse files
authored
Merge pull request #8811 from OpenMined/fix_request_repr
Fix request repr
2 parents aaf2b1a + e17b6ed commit d26e911

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

packages/syft/src/syft/service/request/request.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -467,9 +467,9 @@ def _coll_repr_(self) -> dict[str, str | dict[str, str]]:
467467
]
468468

469469
return {
470-
"Request time": str(self.request_time),
471470
"Description": self.html_description,
472471
"Requested By": "\n".join(user_data),
472+
"Creation Time": str(self.request_time),
473473
"Status": status_badge,
474474
}
475475

@@ -1220,18 +1220,19 @@ def nested_repr(self, node: Any | None = None, level: int = 0) -> str:
12201220

12211221
def __repr_syft_nested__(self) -> str:
12221222
msg = (
1223-
f"Request to change <b>{self.code.service_func_name}</b> "
1224-
f"(Pool Id: <b>{self.code.worker_pool_name}</b>) "
1223+
f"Request to change <strong>{self.code.service_func_name}</strong> "
1224+
f"(Pool Id: <strong>{self.code.worker_pool_name}</strong>) "
12251225
)
1226-
msg += "to permission <strong>RequestStatus.APPROVED.</strong>"
1227-
if self.nested_solved:
1228-
if self.link.nested_codes == {}: # type: ignore
1229-
msg += "No nested requests."
1230-
else:
1226+
msg += "to permission RequestStatus.APPROVED."
1227+
if self.code.nested_codes is None or self.code.nested_codes == {}: # type: ignore
1228+
msg += " No nested requests"
1229+
else:
1230+
if self.nested_solved:
1231+
# else:
12311232
msg += "<br><br>This change requests the following nested functions calls:<br>"
12321233
msg += self.nested_repr()
1233-
else:
1234-
msg += "Nested Requests not resolved."
1234+
else:
1235+
msg += " Nested Requests not resolved"
12351236
return msg
12361237

12371238
def _repr_markdown_(self, wrap_as_python: bool = True, indent: int = 0) -> str:

0 commit comments

Comments
 (0)