rhtyd commented on a change in pull request #3483: api: fix account delete
event description, wrong user
URL: https://github.com/apache/cloudstack/pull/3483#discussion_r302411188
##########
File path:
api/src/main/java/org/apache/cloudstack/api/command/admin/account/DeleteAccountCmd.java
##########
@@ -92,7 +93,8 @@ public String getEventType() {
@Override
public String getEventDescription() {
- User user = _responseGenerator.findUserById(getId());
+ List<User> users =
_accountService.getAccountUsers(_accountService.getAccount(getId()));
+ User user = users.isEmpty() ? null : users.get(0);
return (user != null ? ("deleting User " + user.getUsername() + " (id:
" + user.getId() + ") and accountId = " + user.getAccountId())
Review comment:
can you use uuids?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services