fix: align get_search_upappid.dspy with {value, text} format
This commit is contained in:
parent
e6958f277b
commit
9377cfabb8
@ -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}')
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user