This is an automated email from the ASF dual-hosted git repository.
husseinawala pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new a877bde5a3 Fix assignment of template field in `__init__` in
`DataSyncOperator` (#36605)
a877bde5a3 is described below
commit a877bde5a35e060f3e6d8edcf8079cfdbfaf14d1
Author: rom sharon <[email protected]>
AuthorDate: Fri Jan 5 01:10:05 2024 +0200
Fix assignment of template field in `__init__` in `DataSyncOperator`
(#36605)
* set default values of parameters
* Update airflow/providers/amazon/aws/operators/datasync.py
Co-authored-by: Hussein Awala <[email protected]>
* Update airflow/providers/amazon/aws/operators/datasync.py
Co-authored-by: Hussein Awala <[email protected]>
---------
Co-authored-by: Hussein Awala <[email protected]>
---
airflow/providers/amazon/aws/operators/datasync.py | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/airflow/providers/amazon/aws/operators/datasync.py
b/airflow/providers/amazon/aws/operators/datasync.py
index 455b098184..f990ffbb70 100644
--- a/airflow/providers/amazon/aws/operators/datasync.py
+++ b/airflow/providers/amazon/aws/operators/datasync.py
@@ -155,12 +155,8 @@ class DataSyncOperator(BaseOperator):
self.allow_random_location_choice = allow_random_location_choice
self.create_task_kwargs = create_task_kwargs or {}
- self.create_source_location_kwargs = {}
- if create_source_location_kwargs:
- self.create_source_location_kwargs = create_source_location_kwargs
- self.create_destination_location_kwargs = {}
- if create_destination_location_kwargs:
- self.create_destination_location_kwargs =
create_destination_location_kwargs
+ self.create_source_location_kwargs = create_source_location_kwargs or
{}
+ self.create_destination_location_kwargs =
create_destination_location_kwargs or {}
self.update_task_kwargs = update_task_kwargs or {}
self.task_execution_kwargs = task_execution_kwargs or {}