From fb9ab5f719b31d0521ced8b1ef9accd8d771770e Mon Sep 17 00:00:00 2001 From: yumoqing Date: Tue, 28 Apr 2026 22:08:18 +0800 Subject: [PATCH] bugfix --- wwwroot/upload_asset/index.dspy | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/wwwroot/upload_asset/index.dspy b/wwwroot/upload_asset/index.dspy index 22b836d..79d39af 100644 --- a/wwwroot/upload_asset/index.dspy +++ b/wwwroot/upload_asset/index.dspy @@ -1,7 +1,22 @@ upappid = 'wetokenai' apiname = 'upload_asset' uapi = UpAppApi(request) -userid = await get_user() +env = request._run_ns +userid = None +async with get_sor_context(env, 'llmage') as sor: + recs = await sor.R('upapp', {'id': upappid}) + if len(recs) < 1: + exception(f'{upappid=} upapp not found') + return { + 'status': 'FAILED', + 'error': f'{upappid=} upapp not found' + } + userid = await sor_get_callerid(sor, recs[0].ownerid) +if userid is None: + return { + 'status': 'FAILED', + 'error': f'sor_get_callerid() error' + } try: d = await uapi.call(upappid, apiname, userid, params=params_kw) if isinstance(b, bytes): @@ -9,6 +24,7 @@ try: d = json.loads(b) return d except Exception as e: + exception(f'{e}, {format_exc()}') return { 'status': 'FAILED', 'error': f'{e}'