uranusjr commented on code in PR #24724:
URL: https://github.com/apache/airflow/pull/24724#discussion_r910238535
##########
airflow/templates.py:
##########
@@ -56,9 +56,11 @@ def ts_filter(value):
return value.isoformat()
-def ts_nodash_filter(value):
- return value.strftime('%Y%m%dT%H%M%S')
-
+def ts_nodash_filter(*value):
+ if value:
+ return value.strftime('%Y%m%dT%H%M%S')
+ else:
+ return None
Review Comment:
Search “falsy python” in any search engine.
> I thought if we take the value as variable args it would work since if an
empty list is passed or with values is it not the case
It is not, the filter is passed one single value, the datetime, and we are
adding None to the possible input type. Please read up the documentation to
understand how the filters are used.
https://airflow.apache.org/docs/apache-airflow/stable/templates-ref.html#filters
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]