potiuk commented on a change in pull request #12837:
URL: https://github.com/apache/airflow/pull/12837#discussion_r537086130
##########
File path: airflow/providers_manager.py
##########
@@ -244,7 +256,13 @@ def _add_hook(self, hook_class_name: str,
provider_package: str) -> None:
# hierarchy and we add it only from the parent hook that provides
those!
if 'get_connection_form_widgets' in hook_class.__dict__:
widgets = hook_class.get_connection_form_widgets()
- self._add_widgets(provider_package, hook_class, widgets)
+ if len(widgets.keys()) > 0:
+ self._add_widgets(provider_package, hook_class, widgets)
+ if 'get_custom_fields' in hook_class.__dict__:
+ customized_fields = hook_class.get_custom_fields()
+ if len(customized_fields.keys()) > 0:
Review comment:
Why not
----------------------------------------------------------------
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:
[email protected]