From 1bc14c53d44b2ea5b5e2fa52bbf0e1d399eacb85 Mon Sep 17 00:00:00 2001 From: xinwen Date: Mon, 13 Dec 2021 15:52:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=81=E4=B8=9A=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E5=8F=91=E9=80=81=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/common/sdk/im/utils.py | 4 ++-- apps/common/sdk/im/wecom/__init__.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/common/sdk/im/utils.py b/apps/common/sdk/im/utils.py index 2386d0eff..86f41cdc3 100644 --- a/apps/common/sdk/im/utils.py +++ b/apps/common/sdk/im/utils.py @@ -29,7 +29,7 @@ def set_default(data: dict, default: dict): class DictWrapper: - def __init__(self, data:dict): + def __init__(self, data: dict): self.raw_data = data def __getitem__(self, item): @@ -51,7 +51,7 @@ class DictWrapper: return str(self.raw_data) def __repr__(self): - return str(self.raw_data) + return repr(self.raw_data) def as_request(func): diff --git a/apps/common/sdk/im/wecom/__init__.py b/apps/common/sdk/im/wecom/__init__.py index 7640228e9..6d7c2bf66 100644 --- a/apps/common/sdk/im/wecom/__init__.py +++ b/apps/common/sdk/im/wecom/__init__.py @@ -124,6 +124,9 @@ class WeCom(RequestMixin): return users self._requests.check_errcode_is_0(data) + if 'invaliduser' not in data: + return () + invaliduser = data['invaliduser'] if not invaliduser: return ()