feat: カラム定義側を小文字対応する
This commit is contained in:
parent
1ed5c50462
commit
5948468e59
@ -2,7 +2,4 @@ from pydantic import BaseModel
|
||||
|
||||
|
||||
class BaseDBModel(BaseModel):
|
||||
def __init__(__pydantic_self__, **data) -> None:
|
||||
"""DBカラム名が大文字で取れることを見越して、キーを小文字にしてからインスタンス化する"""
|
||||
lower_case_data = dict((k.lower(), v) for k, v in data.items())
|
||||
super().__init__(**lower_case_data)
|
||||
pass
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user