We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 686668c commit 9b539e6Copy full SHA for 9b539e6
1 file changed
src/a2a/server/tasks/database_task_store.py
@@ -189,8 +189,10 @@ async def list(
189
count_stmt = select(func.count()).select_from(base_stmt.alias())
190
total_count = (await session.execute(count_stmt)).scalar_one()
191
192
+ # Use coalesce to treat NULL timestamps as empty strings,
193
+ # which sort last in descending order
194
stmt = base_stmt.order_by(
- timestamp_col.desc().nulls_last(),
195
+ func.coalesce(timestamp_col, '').desc(),
196
self.task_model.id.desc(),
197
)
198
0 commit comments