Skip to content

Commit

Permalink
Fix 'NoneType' object is not subscriptable. (#29820)
Browse files Browse the repository at this point in the history
  • Loading branch information
wiktorn authored Feb 28, 2023
1 parent 8603d09 commit 972fca2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion airflow/providers/google/cloud/transfers/gcs_to_gcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ def _copy_source_without_wildcard(self, hook, prefix):

def _copy_file(self, hook, source_object):
destination_object = self.destination_object or source_object
if self.destination_object[-1] == "/":
if self.destination_object and self.destination_object[-1] == "/":
file_name = source_object.split("/")[-1]
destination_object += file_name
self._copy_single_object(
Expand Down

0 comments on commit 972fca2

Please sign in to comment.