You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/10/25 14:41:33 UTC

[GitHub] [airflow] alexandermalyga commented on a diff in pull request #27261: Make GSheetsHook return an empty list when there are no values

alexandermalyga commented on code in PR #27261:
URL: https://github.com/apache/airflow/pull/27261#discussion_r1004581686


##########
airflow/providers/google/suite/hooks/sheets.py:
##########
@@ -115,7 +115,7 @@ def get_values(
             .execute(num_retries=self.num_retries)
         )
 
-        return response["values"]
+        return response.get('values', [])

Review Comment:
   Used an empty list to respect the function's signature, but `None` could also be valid if we're willing to change the return type to `Optional[list]`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org