]> git.immae.eu Git - github/fretlink/tap-google-sheets.git/commitdiff
Skip normal looking times support-time-values
authorAndy Lu <andy@stitchdata.com>
Mon, 8 Feb 2021 22:35:33 +0000 (22:35 +0000)
committerAndy Lu <andy@stitchdata.com>
Mon, 8 Feb 2021 22:35:33 +0000 (22:35 +0000)
tap_google_sheets/sync.py

index 986c6ca1b75680c33f1f10a2b1fe55eb4f9b0982..d4db8ecaad3e89a12def44ef268afe3136d544fb 100644 (file)
@@ -66,8 +66,8 @@ def write_bookmark(state, stream, value):
 
 def drop_date_on_time(schema, record):
     for field, field_schema in schema['properties'].items():
-        if field_schema.get('format') == 'time':
-            # `time` fields come back from Google like `X days, H:M:S`
+        if field_schema.get('format') == 'time' and 'days,' in record[field]:
+            # `time` fields can come back from Google like `X days, H:M:S`
             old_time = record[field]
             new_time = old_time.split(',')[1].strip()
             record[field] = new_time