From 9377cfabb8f7044141968da90dbc6c2ba10da40a Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 4 Jun 2026 17:56:34 +0800 Subject: [PATCH] fix: align get_search_upappid.dspy with {value, text} format --- wwwroot/api/get_search_upappid.dspy | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/wwwroot/api/get_search_upappid.dspy b/wwwroot/api/get_search_upappid.dspy index 7d9b890..6f6a55c 100644 --- a/wwwroot/api/get_search_upappid.dspy +++ b/wwwroot/api/get_search_upappid.dspy @@ -1,14 +1,12 @@ -result = [{'upappid': '', 'upappid_text': '全部'}] +result = [{'value': '', 'text': '全部'}] try: async with get_sor_context(request._run_ns, 'uapi') as sor: apps = await sor.sqlExe( - "select id, name from upapp order by name", + "select id as value, name as text from upapp order by name", {} ) - if apps: - for r in apps: - result.append({'upappid': str(r.id), 'upappid_text': r.name or ''}) + return apps except Exception as e: debug(f'get_search_upappid error: {e}')