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 2019/08/29 11:32:47 UTC

[GitHub] [airflow] ashb commented on a change in pull request #5688: [AIRFLOW-5073] Treat NULL as keep poking in SQL sensor

ashb commented on a change in pull request #5688: [AIRFLOW-5073] Treat NULL as keep poking in SQL sensor
URL: https://github.com/apache/airflow/pull/5688#discussion_r319019892
 
 

 ##########
 File path: airflow/sensors/sql_sensor.py
 ##########
 @@ -98,4 +102,6 @@ def poke(self, context):
                 return self.success(first_cell)
             else:
                 raise AirflowException("self.success is present, but not callable -> {}".format(self.success))
-        return str(first_cell) not in ('0', '')
+        if self.allow_null:
+            return str(first_cell) not in ('0', '')
+        return str(first_cell) not in ('0', '', 'None')
 
 Review comment:
   ```suggestion
           return first_cell is not None and str(first_cell) not in ('0', '')
   ``

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services