mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-04 21: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:
@@ -327,6 +327,7 @@ If an item contains spaces, it should be surrounded by ".
|
|||||||
description|
|
description|
|
||||||
editable|
|
editable|
|
||||||
explicitlytrashed|
|
explicitlytrashed|
|
||||||
|
driveid|
|
||||||
fileextension|
|
fileextension|
|
||||||
filesize|
|
filesize|
|
||||||
foldercolorrgb|
|
foldercolorrgb|
|
||||||
|
|||||||
@@ -3273,7 +3273,7 @@ def printDriveFileList(users):
|
|||||||
'orderby', ', '.join(sorted(DRIVEFILE_ORDERBY_CHOICES_MAP)),
|
'orderby', ', '.join(sorted(DRIVEFILE_ORDERBY_CHOICES_MAP)),
|
||||||
fieldName)
|
fieldName)
|
||||||
elif myarg == 'query':
|
elif myarg == 'query':
|
||||||
query += f' and {sys.argv[i+1]}'
|
query += f' and ({sys.argv[i+1]})'
|
||||||
i += 2
|
i += 2
|
||||||
elif myarg == 'fullquery':
|
elif myarg == 'fullquery':
|
||||||
query = sys.argv[i + 1]
|
query = sys.argv[i + 1]
|
||||||
|
|||||||
@@ -458,6 +458,7 @@ DRIVEFILE_FIELDS_CHOICES_MAP = {
|
|||||||
'createddate': 'createdDate',
|
'createddate': 'createdDate',
|
||||||
'createdtime': 'createdDate',
|
'createdtime': 'createdDate',
|
||||||
'description': 'description',
|
'description': 'description',
|
||||||
|
'driveid': 'driveId',
|
||||||
'editable': 'editable',
|
'editable': 'editable',
|
||||||
'explicitlytrashed': 'explicitlyTrashed',
|
'explicitlytrashed': 'explicitlyTrashed',
|
||||||
'fileextension': 'fileExtension',
|
'fileextension': 'fileExtension',
|
||||||
|
|||||||
Reference in New Issue
Block a user