diff --git a/airflow/utils/context.py b/airflow/utils/context.py index 7681c9d6724df..a71756223ec45 100644 --- a/airflow/utils/context.py +++ b/airflow/utils/context.py @@ -208,7 +208,7 @@ def __str__(self) -> str: return f"OutletEventAccessors(_dict={self._dict})" def __iter__(self) -> Iterator[Asset | AssetAlias]: - return iter( + return ( key.to_asset() if isinstance(key, AssetUniqueKey) else key.to_asset_alias() for key in self._dict )