feng-tao commented on a change in pull request #4799: [AIRFLOW-3975] Handle
null inputs in attribute renderers.
URL: https://github.com/apache/airflow/pull/4799#discussion_r261497612
##########
File path: airflow/www/utils.py
##########
@@ -351,9 +355,8 @@ def get_attr_renderer():
'doc_yaml': lambda x: render(x, lexers.YamlLexer),
'doc_md': wrapped_markdown,
'python_callable': lambda x: render(
- inspect.getsource(x), lexers.PythonLexer),
+ inspect.getsource(x) if x is not None else None,
lexers.PythonLexer),
Review comment:
should this line be `inspect.getsource(x) if x is not None else ''`? For
your .jira description, the issue happens when None passes to render function
which causes exception?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services