This is an automated email from the ASF dual-hosted git repository.
potiuk 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 8654cf67e2 Fix failure of "Add connection" introduced by influxdb
change (#40469)
8654cf67e2 is described below
commit 8654cf67e242a263eb372e25c815011aac09783f
Author: Jarek Potiuk <[email protected]>
AuthorDate: Thu Jun 27 22:38:27 2024 +0200
Fix failure of "Add connection" introduced by influxdb change (#40469)
The #40439 introduced new attributes for influxdb widgets, with
the InputRequired validator, which should not be used on connection
fields, because the fields are all present in the form for all
connection types, and they are just "hidden" dynamically per
connection type. This PR removes InputRequired validation for those
---
airflow/providers/influxdb/hooks/influxdb.py | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/airflow/providers/influxdb/hooks/influxdb.py
b/airflow/providers/influxdb/hooks/influxdb.py
index cfc5246b9d..b1b001730a 100644
--- a/airflow/providers/influxdb/hooks/influxdb.py
+++ b/airflow/providers/influxdb/hooks/influxdb.py
@@ -68,17 +68,13 @@ class InfluxDBHook(BaseHook):
from flask_appbuilder.fieldwidgets import BS3TextFieldWidget
from flask_babel import lazy_gettext
from wtforms import StringField
- from wtforms.validators import InputRequired
return {
- "token": StringField(
- lazy_gettext("Token"), widget=BS3TextFieldWidget(),
default="", validators=[InputRequired()]
- ),
+ "token": StringField(lazy_gettext("Token"),
widget=BS3TextFieldWidget(), default=""),
"org": StringField(
lazy_gettext("Organization Name"),
widget=BS3TextFieldWidget(),
default="",
- validators=[InputRequired()],
),
}