uranusjr commented on code in PR #57452:
URL: https://github.com/apache/airflow/pull/57452#discussion_r2488703997
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/assets.py:
##########
@@ -244,7 +244,7 @@ def get_asset_aliases(
)
return AssetAliasCollectionResponse(
- asset_aliases=session.scalars(asset_aliases_select),
+ asset_aliases=list(session.scalars(asset_aliases_select)),
Review Comment:
But we don’t need a list here. It would be better to change the type hint on
AssetAliasCollectionResponse to take a Sequence instead.
Actually, I don’t think we even need `.all()` in the first place. Pydantic
supports using simply Iterable, and ScalarResult would just work. Same for
other similar cases.
--
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]