mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-28 03:15:24 +08:00
🐛 fix missing self instance validate
This commit is contained in:
parent
5abf55d095
commit
2ec5917709
@ -164,7 +164,9 @@ class Message(List[TMS], abc.ABC):
|
||||
|
||||
@classmethod
|
||||
def _validate(cls, value):
|
||||
if isinstance(value, str):
|
||||
if isinstance(value, cls):
|
||||
return value
|
||||
elif isinstance(value, str):
|
||||
pass
|
||||
elif isinstance(value, dict):
|
||||
value = parse_obj_as(cls.get_segment_class(), value)
|
||||
|
Loading…
Reference in New Issue
Block a user