mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Fix CallbackData without default Optional (#1370)
* fix: CallbackData set optional as None * docs: add fix changelog * Add support for nullable fields in callback data This update extends the callback data handling by adding support for nullable fields. The code now uses the Python typing structures `Optional` and `Union` to parse such fields correctly. A helper function `_check_field_is_nullable` has been added to assist in efficiently checking if a given field is nullable. * Add support for nullable fields in callback data This update extends the callback data handling by adding support for nullable fields. The code now uses the Python typing structures `Optional` and `Union` to parse such fields correctly. A helper function `_check_field_is_nullable` has been added to assist in efficiently checking if a given field is nullable. --------- Co-authored-by: JRoot Junior <jroot.junior@gmail.com>
This commit is contained in:
parent
ebade3d51f
commit
e17e3bc71c
5 changed files with 41 additions and 4 deletions
1
CHANGES/1368.bugfix.rst
Normal file
1
CHANGES/1368.bugfix.rst
Normal file
|
|
@ -0,0 +1 @@
|
|||
Fixed a situation where a :code:`CallbackData` could not be parsed without a default value.
|
||||
Loading…
Add table
Add a link
Reference in a new issue