This commit is contained in:
yumoqing 2026-03-13 14:54:24 +08:00
parent 7c43ba8880
commit ff74df8fe1

View File

@ -292,7 +292,7 @@ where backid=${backid}$
async def auto_assign(self, sor, inst, ne, node):
recs = await env.get_org_users(sor, inst.org_id, ne.role)
if recs:
i = randint(len(recs) - 1)
i = randint(0, len(recs) - 1)
await sor.U('node_execution', {
'id':ne.id,
'assignee': recs[i].id
@ -501,7 +501,7 @@ where instance_id=${instance_id}$
def get_engine():
env = ServerEnv()
cnt = len(env.flow_engines)
id = randint(cnt-1)
id = randint(0, cnt-1)
return env.flow_engines[id]
async def add_new_workflow(request, params_kw={}):