mirror of
https://github.com/GAM-team/GAM.git
synced 2025-07-08 13:43:35 +00:00
Fix bug in print vaultcounts ... account emailaddress (#1493)
This commit is contained in:
@ -348,7 +348,7 @@ def print_count():
|
|||||||
# so we keep track of which accounts we searched and can report
|
# so we keep track of which accounts we searched and can report
|
||||||
# zero data for them.
|
# zero data for them.
|
||||||
if search_method == 'ACCOUNT':
|
if search_method == 'ACCOUNT':
|
||||||
query_accounts = query.get('accountInfo', [])
|
query_accounts = query.get('accountInfo', {}).get('emails', [])
|
||||||
elif search_method == 'ENTIRE_ORG':
|
elif search_method == 'ENTIRE_ORG':
|
||||||
query_accounts = gam.getUsersToModify('all', 'users')
|
query_accounts = gam.getUsersToModify('all', 'users')
|
||||||
elif search_method == 'ORG_UNIT':
|
elif search_method == 'ORG_UNIT':
|
||||||
@ -367,7 +367,8 @@ def print_count():
|
|||||||
if account in query_accounts: query_accounts.remove(account)
|
if account in query_accounts: query_accounts.remove(account)
|
||||||
for account in a_count.get('accountCounts', []):
|
for account in a_count.get('accountCounts', []):
|
||||||
email = account.get('account', {}).get('email', '')
|
email = account.get('account', {}).get('email', '')
|
||||||
csv_rows.append({'account': email, 'count': account.get('count')})
|
if email:
|
||||||
|
csv_rows.append({'account': email, 'count': account.get('count', 0)})
|
||||||
if email in query_accounts: query_accounts.remove(email)
|
if email in query_accounts: query_accounts.remove(email)
|
||||||
for account in query_accounts:
|
for account in query_accounts:
|
||||||
csv_rows.append({'account': account, 'count': 0})
|
csv_rows.append({'account': account, 'count': 0})
|
||||||
|
Reference in New Issue
Block a user