Skip to content

Commit

Permalink
Fix failure of "Add connection" introduced by influxdb change (apache…
Browse files Browse the repository at this point in the history
…#40469)

The apache#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
  • Loading branch information
potiuk authored and romsharon98 committed Jul 26, 2024
1 parent 3957f84 commit e16afec
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions airflow/providers/influxdb/hooks/influxdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,13 @@ def get_connection_form_widgets(cls) -> dict[str, Any]:
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()],
),
}

Expand Down

0 comments on commit e16afec

Please sign in to comment.