uranusjr commented on code in PR #41325:
URL: https://github.com/apache/airflow/pull/41325#discussion_r1833788443
##########
airflow/utils/context.py:
##########
@@ -274,14 +279,27 @@ def __getitem__(self, key: int | str | Asset |
AssetAlias) -> LazyAssetEventSele
obj = self._inlets[key]
if not isinstance(obj, (Asset, AssetAlias)):
raise IndexError(key)
+
+ if isinstance(obj, AssetRef):
+ obj = _fetch_active_assets_by_name([obj.name], self._session)
Review Comment:
Is this correct? An IndexError is raised when `obj` is _not_ Asset or
AssetAlias; how can it reach the next if below?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]