Browse Source

fix: 企业微信发送报错

pull/7371/head^2
xinwen 3 years ago committed by 老广
parent
commit
1bc14c53d4
  1. 4
      apps/common/sdk/im/utils.py
  2. 3
      apps/common/sdk/im/wecom/__init__.py

4
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):

3
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 ()

Loading…
Cancel
Save