]> git.immae.eu Git - github/fretlink/tap-google-sheets.git/commitdiff
return an empty list when values is missing (#17)
authorKyle Allan <KAllan357@gmail.com>
Wed, 15 Jul 2020 13:57:50 +0000 (09:57 -0400)
committerGitHub <noreply@github.com>
Wed, 15 Jul 2020 13:57:50 +0000 (09:57 -0400)
tap_google_sheets/sync.py

index 3e26bc43cfe6db1143b15f068833159fc8eca045..26c2d19cebd1a4c174eeffa3a0be78797006d8a4 100644 (file)
@@ -505,7 +505,7 @@ def sync(client, config, catalog, state):
                             spreadsheet_id=spreadsheet_id,
                             range_rows=range_rows)
                         # Data is returned as a list of arrays, an array of values for each row
-                        sheet_data_rows = sheet_data.get('values')
+                        sheet_data_rows = sheet_data.get('values', [])
 
                         # Transform batch of rows to JSON with keys for each column
                         sheet_data_tf, row_num = transform_sheet_data(