mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Update callback_data.py
This commit is contained in:
parent
5a5ea473be
commit
0ebfe1aade
1 changed files with 1 additions and 1 deletions
|
|
@ -131,7 +131,7 @@ class CallbackData(BaseModel):
|
|||
payload = {}
|
||||
for k, v in zip(names, parts): # type: str, Optional[str]
|
||||
if field := cls.model_fields.get(k):
|
||||
if v == "" and _check_field_is_nullable(field):
|
||||
if v == "" and _check_field_is_nullable(field) and field.default != "":
|
||||
v = field.default if field.default is not PydanticUndefined else None
|
||||
payload[k] = v
|
||||
return cls(**payload)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue