mirror of https://github.com/apache/cloudstack.git
bug 6886: fixing the npe which occurs when we try to delete a non existant user. We were trying to return user details for an async job desc assuming the user always existed. Changing that logic to ensure when we don't have such details, we log the apt message
status 6886: resolved fixed
This commit is contained in:
parent
566521fbf3
commit
85f78d8cb3
|
|
@ -85,7 +85,7 @@ public class DeleteUserCmd extends BaseAsyncCmd {
|
|||
@Override
|
||||
public String getEventDescription() {
|
||||
User user = ApiDBUtils.findUserById(getId());
|
||||
return "User " + user.getUsername() + " (id: " + user.getId() + ") and accountId = " + user.getAccountId();
|
||||
return (user != null ? ("User " + user.getUsername() + " (id: " + user.getId() + ") and accountId = " + user.getAccountId()) : "user delete, but this user does not exist in the system");
|
||||
}
|
||||
|
||||
@Override @SuppressWarnings("unchecked")
|
||||
|
|
|
|||
Loading…
Reference in New Issue