Skip to content

Commit

Permalink
GoogleDrive.py: fix get-parents infinite loop (#33209) (#33254)
Browse files Browse the repository at this point in the history
Co-authored-by: GalNakash-RecoLabs <71227802+GalNakash-RecoLabs@users.noreply.github.com>
Co-authored-by: merit-maita <49760643+merit-maita@users.noreply.github.com>
  • Loading branch information
3 people committed Mar 7, 2024
1 parent 14911e8 commit 3710960
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Packs/GoogleDrive/Integrations/GoogleDrive/GoogleDrive.py
Expand Up @@ -1087,6 +1087,10 @@ def file_get_parents(client: 'GSuiteClient', args: dict[str, str]) -> CommandRes
file_id = parent.get('id', '')
break

# break loop if no items
if len(response.get('items', [])) == 0:
break

outputs: dict = {
OUTPUT_PREFIX['PARENTS']: parents
}
Expand Down
2 changes: 1 addition & 1 deletion Packs/GoogleDrive/Integrations/GoogleDrive/GoogleDrive.yml
Expand Up @@ -3103,7 +3103,7 @@ script:
- contextPath: GoogleDrive.File.Parents
description: The IDs of the parent folders which contain the file.
type: String
dockerimage: demisto/googleapi-python3:1.0.0.87804
dockerimage: demisto/googleapi-python3:1.0.0.89217
isfetch: true
runonce: false
script: "-"
Expand Down
7 changes: 7 additions & 0 deletions Packs/GoogleDrive/ReleaseNotes/1_3_4.md
@@ -0,0 +1,7 @@

#### Integrations

##### Google Drive

- Improved implementation of ***google-drive-file-get-parents*** command.
- Updated the Docker image to *demisto/googleapi-python3:1.0.0.89217*.
2 changes: 1 addition & 1 deletion Packs/GoogleDrive/pack_metadata.json
Expand Up @@ -2,7 +2,7 @@
"name": "Google Drive",
"description": "Google Drive allows users to store files on their servers, synchronize files across devices, and share files. This integration helps you to create a new drive, query past activity and view change logs performed by the users, as well as list drives and files, and manage their permissions.",
"support": "xsoar",
"currentVersion": "1.3.3",
"currentVersion": "1.3.4",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down

0 comments on commit 3710960

Please sign in to comment.