mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-03 20:31:35 +00:00
cat and allow closed matters on show holds
This commit is contained in:
@@ -337,9 +337,9 @@ def print_count():
|
|||||||
_validate_query(query, query_discovery)
|
_validate_query(query, query_discovery)
|
||||||
body['query'] = query
|
body['query'] = query
|
||||||
operation = gapi.call(v.matters(), 'count', matterId=matterId, body=body)
|
operation = gapi.call(v.matters(), 'count', matterId=matterId, body=body)
|
||||||
print(f'Watching operation {operation["name"]}...')
|
sys.stderr.write(f'Watching operation {operation["name"]}...\n')
|
||||||
while not operation.get('done'):
|
while not operation.get('done'):
|
||||||
print(f' operation {operation["name"]} is not done yet. Checking again in {operation_wait} seconds')
|
sys.stderr.write(f' operation {operation["name"]} is not done yet. Checking again in {operation_wait} seconds\n')
|
||||||
sleep(operation_wait)
|
sleep(operation_wait)
|
||||||
operation = gapi.call(v.operations(), 'get', name=operation['name'])
|
operation = gapi.call(v.operations(), 'get', name=operation['name'])
|
||||||
response = operation.get('response', {})
|
response = operation.get('response', {})
|
||||||
@@ -684,11 +684,16 @@ def showHoldsForUsers(users):
|
|||||||
matterIds = _getAllMatterIds(v)
|
matterIds = _getAllMatterIds(v)
|
||||||
matterHolds = {}
|
matterHolds = {}
|
||||||
for matterId in matterIds:
|
for matterId in matterIds:
|
||||||
matterHolds[matterId] = gapi.get_all_pages(v.matters().holds(),
|
try:
|
||||||
'list',
|
fields = 'holds(holdId,name,accounts(accountId,email),orgUnit),nextPageToken'
|
||||||
'holds',
|
matterHolds[matterId] = gapi.get_all_pages(v.matters().holds(),
|
||||||
fields='holds(holdId,name,accounts(accountId,email),orgUnit),nextPageToken',
|
'list',
|
||||||
matterId=matterId)
|
'holds',
|
||||||
|
fields=fields,
|
||||||
|
throw_reasons=[gapi_errors.ErrorReason.FOUR_O_O],
|
||||||
|
matterId=matterId)
|
||||||
|
except googleapiclient.errors.HttpError:
|
||||||
|
continue
|
||||||
totalHolds = 0
|
totalHolds = 0
|
||||||
for user in users:
|
for user in users:
|
||||||
user = user.lower()
|
user = user.lower()
|
||||||
|
|||||||
Reference in New Issue
Block a user