phi-friday commented on code in PR #38942:
URL: https://github.com/apache/airflow/pull/38942#discussion_r1563128664


##########
airflow/api_connexion/endpoints/xcom_endpoint.py:
##########
@@ -74,8 +74,8 @@ def get_xcom_entries(
     # Match idx_xcom_task_instance + idx_xcom_key for performance.
     query = query.order_by(XCom.dag_id, XCom.task_id, XCom.run_id, 
XCom.map_index, XCom.key)
     total_entries = get_query_count(query, session=session)
-    query = session.scalars(query.offset(offset).limit(limit))
-    return xcom_collection_schema.dump(XComCollection(xcom_entries=query, 
total_entries=total_entries))
+    xcom_entries = session.scalars(query.offset(offset).limit(limit)).all()
+    return 
xcom_collection_schema.dump(XComCollection(xcom_entries=xcom_entries, 
total_entries=total_entries))

Review Comment:
   I checked the use case for `XComCollection` and this was the only one, so I 
changed `list[XCom]` to `Iterable[XCom]` and modified it as you suggested.



-- 
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]

Reply via email to