From 13288a1a08874bb83612c4a84a132eb3f92b1543 Mon Sep 17 00:00:00 2001 From: freeziyou <80776877@qq.com> Date: Mon, 26 Feb 2024 12:06:02 +0800 Subject: [PATCH] fix repeat name --- server/tasks/lark/manage.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/tasks/lark/manage.py b/server/tasks/lark/manage.py index 561211d3..0337fb2d 100644 --- a/server/tasks/lark/manage.py +++ b/server/tasks/lark/manage.py @@ -340,9 +340,11 @@ def create_chat_group_for_repo( # 把user_id_list中的每个user_id查User表,获取每个人的名字 user_name_list = [ name - for name, in db.session.query(IMUser.name).filter( + for name, in db.session.query(IMUser.name) + .filter( IMUser.openid.in_(user_id_list), ) + .distinct() ] try: chat_id = args[1]["event"]["message"]["chat_id"]