作者 lemon

更新加人通道传参数方式fix2

... ... @@ -45,6 +45,15 @@ class WorkPlace():
data['date[current]'] = 'on'
return data
@classmethod
def from_dict(cls,data:dict):
self = cls()
for k,v in data.items():
if hasattr(self,k):
setattr(self,k,v)
return self
@attrs(cmp=False)
class College():
... ...
... ... @@ -156,7 +156,10 @@ class RequestSource():
@classmethod
def get(cls, channel):
if isinstance(channel, str):
channel = int(channel)
try:
channel = int(channel)
except:
pass
return cls.const.get(channel, channel)
... ...