diff --git a/.changes/unreleased/Under the Hood-20240123-194242.yaml b/.changes/unreleased/Under the Hood-20240123-194242.yaml new file mode 100644 index 00000000..a0cb7431 --- /dev/null +++ b/.changes/unreleased/Under the Hood-20240123-194242.yaml @@ -0,0 +1,6 @@ +kind: Under the Hood +body: Change metadata_vars \`if not\` to \`if ... is None\` +time: 2024-01-23T19:42:42.95727089Z +custom: + Author: truls-p + Issue: "6073" diff --git a/dbt_common/events/functions.py b/dbt_common/events/functions.py index 60ef4d27..fde2219b 100644 --- a/dbt_common/events/functions.py +++ b/dbt_common/events/functions.py @@ -138,7 +138,7 @@ def fire_event(e: BaseEvent, level: Optional[EventLevel] = None) -> None: def get_metadata_vars() -> Dict[str, str]: global metadata_vars - if not metadata_vars: + if metadata_vars is None: metadata_vars = { k[len(_METADATA_ENV_PREFIX) :]: v for k, v in os.environ.items() if k.startswith(_METADATA_ENV_PREFIX) }