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_r302409807
 
 

 ##########
 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);
 
 Review comment:
   The event description is wrong, the account is being deleted it may not even 
mention the users and simply say removing all users under the account.

----------------------------------------------------------------
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

Reply via email to