From d1b66cff86cd3123029ac89c709e5f1407791a64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Thu, 23 Apr 2026 16:09:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_notice/models/yuthon_notice.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yuthon_notice/models/yuthon_notice.py b/yuthon_notice/models/yuthon_notice.py index c4144f0e6..fa77fa18b 100644 --- a/yuthon_notice/models/yuthon_notice.py +++ b/yuthon_notice/models/yuthon_notice.py @@ -211,7 +211,6 @@ class YuthonNotice(models.Model): continue url = f'https://phone.thtzjt.com/phone/Notice/{self.id}?employee_id={employee.id}' - # 发送消息(和上面保持完全一致) result_data = self.sudo().env["wecom.apps"].sync_send_message_textcard( category='notice', touser=user_id.employee_id.wecom_userid, @@ -222,8 +221,9 @@ class YuthonNotice(models.Model): ) msg_id = None - if result_data and 'msgid' in result_data[-1]: - msg_id = result_data[-1]['msgid'] + if result_data: + res_dict = result_data[1] + msg_id = res_dict.get('msgid') user_wecom_mapping.append({ 'emp_id': employee.id,