Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion airflow-core/src/airflow/models/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

from airflow._shared.module_loading import import_string
from airflow._shared.secrets_masker import mask_secret
from airflow.configuration import conf, ensure_secrets_loaded
from airflow.exceptions import AirflowException, AirflowNotFoundException
from airflow.models.base import ID_LEN, Base
from airflow.models.crypto import get_fernet
Expand Down Expand Up @@ -528,6 +527,8 @@ def get_connection_from_secrets(cls, conn_id: str, team_name: str | None = None)
raise AirflowNotFoundException(f"The conn_id `{conn_id}` isn't defined") from None
raise

from airflow.configuration import conf, ensure_secrets_loaded

if team_name and not conf.getboolean("core", "multi_team"):
raise ValueError(
"Multi-team mode is not configured in the Airflow environment but the task trying to access the connection belongs to a team"
Expand Down
Loading