From dff9692d993d950036c79a8f5a8033a903be3c61 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: Fri, 6 Feb 2026 15:02:12 +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, 4 insertions(+), 2 deletions(-) diff --git a/yuthon_notice/models/yuthon_notice.py b/yuthon_notice/models/yuthon_notice.py index da2bdabd7..16f830e25 100644 --- a/yuthon_notice/models/yuthon_notice.py +++ b/yuthon_notice/models/yuthon_notice.py @@ -230,8 +230,10 @@ class YuthonNotice(models.Model): url=url, btntxt="详细信息" ) - if result_data and isinstance(result_data, list) and 'msgid' in result_data[-1]: - msg_id = result_data[-1]['msgid'] + if result_data and isinstance(result_data, tuple) and len(result_data) >= 2: + res_dict = result_data[1] + if res_dict.get('errcode') == 0 and res_dict.get('errmsg') == 'ok' and 'msgid' in res_dict: + msg_id = res_dict['msgid'] for mapping in user_wecom_mapping: emp_id = mapping['emp_id']