fix: 企业微信发送报错

pull/7371/head^2
xinwen 3 years ago committed by 老广
parent 5024d0d739
commit 1bc14c53d4

@ -29,7 +29,7 @@ def set_default(data: dict, default: dict):
class DictWrapper: class DictWrapper:
def __init__(self, data:dict): def __init__(self, data: dict):
self.raw_data = data self.raw_data = data
def __getitem__(self, item): def __getitem__(self, item):
@ -51,7 +51,7 @@ class DictWrapper:
return str(self.raw_data) return str(self.raw_data)
def __repr__(self): def __repr__(self):
return str(self.raw_data) return repr(self.raw_data)
def as_request(func): def as_request(func):

@ -124,6 +124,9 @@ class WeCom(RequestMixin):
return users return users
self._requests.check_errcode_is_0(data) self._requests.check_errcode_is_0(data)
if 'invaliduser' not in data:
return ()
invaliduser = data['invaliduser'] invaliduser = data['invaliduser']
if not invaliduser: if not invaliduser:
return () return ()

Loading…
Cancel
Save