romsharon98 commented on code in PR #36909:
URL: https://github.com/apache/airflow/pull/36909#discussion_r1459606197


##########
airflow/providers/google/cloud/operators/cloud_storage_transfer_service.py:
##########
@@ -236,7 +236,9 @@ def __init__(
         **kwargs,
     ) -> None:
         super().__init__(**kwargs)
-        self.body = deepcopy(body)
+        self.body = body
+        if isinstance(self.body, dict):
+            self.body = deepcopy(body)

Review Comment:
   As `body` is a templated field, it can also be of type string. While adding 
`string` to the typing is necessary, doing so may lead to a typing error. This 
is because it will treat `body` as a string, even though in the rest of the 
code, we use it as a dictionary.
   Maybe you have an idea to solve it? 😄 



-- 
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-unsubscr...@airflow.apache.org

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

Reply via email to