From 98004a8052bef7076f70085e918d855e7d2e5544 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Wed, 8 Apr 2026 13:49:24 +0800 Subject: [PATCH] bugfix --- uapi/apidata.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/uapi/apidata.py b/uapi/apidata.py index a53f5e4..8687fa6 100644 --- a/uapi/apidata.py +++ b/uapi/apidata.py @@ -114,6 +114,10 @@ where b.orgid = c.ownerid async def get_calluserid(self, appid, orgid=None): users = await self.get_apiusers(appid, orgid=orgid) cnt = len(users) + if cnt < 1: + e = Exception(f'get_calluserid():{appid=}, {orgid=} return None') + exception(f'{e}') + raise e i = randint(0, cnt - 1) return users[i].userid