mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
* Add model validation to remove UNSET before field validation Updated aiogram/types/base.py to include a model validator which removes any 'UNSET' before field validation. This change was necessary to correctly handle `parse_mode` where 'UNSET' is used as a sentinel value. Without the removal of 'UNSET', it would create issues when passed to model initialization from `Bot.method_name`. 'UNSET' was also added to typing. Tiny documentation fix was made. * Added changelog
4 lines
311 B
ReStructuredText
4 lines
311 B
ReStructuredText
Added model validation to remove UNSET before field validation.
|
|
This change was necessary to correctly handle parse_mode where 'UNSET' is used as a sentinel value.
|
|
Without the removal of 'UNSET', it would create issues when passed to model initialization from Bot.method_name.
|
|
'UNSET' was also added to typing.
|