mirror of
https://github.com/PaiGramTeam/PamGram.git
synced 2024-11-16 12:02:16 +00:00
🐛 Fix ValidationError
exception thrown when WebAppData.data
is None
This commit is contained in:
parent
c4db39c3df
commit
84f0f4d5aa
@ -1,3 +1,5 @@
|
|||||||
|
from typing import Optional
|
||||||
|
|
||||||
from genshin import Region, GenshinException
|
from genshin import Region, GenshinException
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
from telegram import ReplyKeyboardRemove, Update, WebAppInfo, ReplyKeyboardMarkup, KeyboardButton
|
from telegram import ReplyKeyboardRemove, Update, WebAppInfo, ReplyKeyboardMarkup, KeyboardButton
|
||||||
@ -20,7 +22,7 @@ from utils.log import logger
|
|||||||
|
|
||||||
class WebAppData(BaseModel):
|
class WebAppData(BaseModel):
|
||||||
path: str
|
path: str
|
||||||
data: dict
|
data: Optional[dict]
|
||||||
code: int
|
code: int
|
||||||
message: str
|
message: str
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user