mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-12-18 09:25:46 +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