This commit is contained in:
yumoqing 2026-04-08 13:49:24 +08:00
parent 65e6ed36c5
commit 98004a8052

View File

@ -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