Skip to content

Commit

Permalink
action-report fix: output wrongly indicates failed operation when a…
Browse files Browse the repository at this point in the history
…ction is applied successfully
  • Loading branch information
aaunario-keeper committed Sep 29, 2023
1 parent a5a4cad commit b370155
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions keepercommander/commands/aram.py
Original file line number Diff line number Diff line change
Expand Up @@ -1898,8 +1898,8 @@ def apply_admin_action(users, target_status='no-update', action='none', dryrun=F
emails = [u.get('username') for u in users]
action_handlers = {
'none': partial(run_cmd, users, None, None, dryrun),
'lock': partial(run_cmd, users, lambda: exec_fn(params, email=emails, lock=True, force=True), 'lock', dry_run),
'delete': partial(run_cmd, users, lambda: exec_fn(params, email=emails, delete=True, force=True), 'delete', dry_run),
'lock': partial(run_cmd, users, lambda: exec_fn(params, email=emails, lock=True, force=True, return_results=True), 'lock', dry_run),
'delete': partial(run_cmd, users, lambda: exec_fn(params, email=emails, delete=True, force=True, return_results=True), 'delete', dry_run),
'transfer': partial(transfer_accounts, users, kwargs.get('target_user'), dryrun)
}

Expand Down
3 changes: 3 additions & 0 deletions keepercommander/commands/enterprise.py
Original file line number Diff line number Diff line change
Expand Up @@ -1735,6 +1735,9 @@ def execute(self, params, **kwargs):
self.display_user(params, user, is_verbose)
print('\n')

if request_batch and kwargs.get('return_results'):
return results

def display_user(self, params, user, is_verbose=False):
enterprise_user_id = user['enterprise_user_id']
username = user['username'] if 'username' in user else '[empty]'
Expand Down

0 comments on commit b370155

Please sign in to comment.