mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Fix explanation_parse_mode validation
This commit is contained in:
parent
360fdfc4d8
commit
46d01a6ae7
3 changed files with 6 additions and 4 deletions
|
|
@ -56,8 +56,9 @@ class TelegramMethod(abc.ABC, BaseModel, Generic[T]):
|
|||
a model initialization from `Bot.method_name`, so we must take care of it and
|
||||
remove it before fields validation.
|
||||
"""
|
||||
if "parse_mode" in values and values["parse_mode"] is UNSET:
|
||||
values.pop("parse_mode")
|
||||
for parse_mode_attribute in {"parse_mode", "explanation_parse_mode"}:
|
||||
if parse_mode_attribute in values and values[parse_mode_attribute] is UNSET:
|
||||
values.pop(parse_mode_attribute)
|
||||
return values
|
||||
|
||||
@property
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue