You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by el...@apache.org on 2021/12/13 12:58:54 UTC

[airflow] branch main updated: Fix MyPy Errors for Tableau provider (#20240)

This is an automated email from the ASF dual-hosted git repository.

eladkal 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 6174198  Fix MyPy Errors for Tableau provider (#20240)
6174198 is described below

commit 6174198a3fa3ab7cffa7394afad48e5082210283
Author: Dmytro Kazanzhy <dk...@gmail.com>
AuthorDate: Mon Dec 13 14:58:21 2021 +0200

    Fix MyPy Errors for Tableau provider (#20240)
    
    Co-authored-by: Dmytro Kazanzhy <dk...@demandbase.com>
---
 airflow/providers/tableau/operators/tableau.py | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/airflow/providers/tableau/operators/tableau.py b/airflow/providers/tableau/operators/tableau.py
index fc93e7a..f1547b0 100644
--- a/airflow/providers/tableau/operators/tableau.py
+++ b/airflow/providers/tableau/operators/tableau.py
@@ -116,10 +116,9 @@ class TableauOperator(BaseOperator):
 
             response = method(resource_id)
 
-        if self.method == 'refresh':
-
-            job_id = response.id
+        job_id = response.id
 
+        if self.method == 'refresh':
             if self.blocking_refresh:
                 if not tableau_hook.wait_for_state(
                     job_id=job_id,
@@ -128,7 +127,7 @@ class TableauOperator(BaseOperator):
                 ):
                     raise TableauJobFailedException(f'The Tableau Refresh {self.resource} Job failed!')
 
-            return job_id
+        return job_id
 
     def _get_resource_id(self, tableau_hook: TableauHook) -> str: