mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-28 18:01:36 +00:00
Fix show filelist query issue; add driveId to drive file fields (#1461)
* Fix show filelist query issue
If the user says: query "A or B" this becomes "'me' in owners and A or B" which is the same as "('me' in owners and A) or B" which gives incorrect results. The fix makes "'me' in owners and (A or B)"
* Add driveId to list of drive file fields
This commit is contained in:
@@ -3273,7 +3273,7 @@ def printDriveFileList(users):
|
||||
'orderby', ', '.join(sorted(DRIVEFILE_ORDERBY_CHOICES_MAP)),
|
||||
fieldName)
|
||||
elif myarg == 'query':
|
||||
query += f' and {sys.argv[i+1]}'
|
||||
query += f' and ({sys.argv[i+1]})'
|
||||
i += 2
|
||||
elif myarg == 'fullquery':
|
||||
query = sys.argv[i + 1]
|
||||
|
||||
@@ -458,6 +458,7 @@ DRIVEFILE_FIELDS_CHOICES_MAP = {
|
||||
'createddate': 'createdDate',
|
||||
'createdtime': 'createdDate',
|
||||
'description': 'description',
|
||||
'driveid': 'driveId',
|
||||
'editable': 'editable',
|
||||
'explicitlytrashed': 'explicitlyTrashed',
|
||||
'fileextension': 'fileExtension',
|
||||
|
||||
Reference in New Issue
Block a user