From 0b9ffc652b5f785ff66c84694f3938eb752b177e Mon Sep 17 00:00:00 2001 From: tanshu Date: Tue, 23 Nov 2021 09:57:09 +0530 Subject: [PATCH] Mypy: The OTP Field is nullable --- brewman/brewman/models/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/brewman/brewman/models/client.py b/brewman/brewman/models/client.py index afa88caf..0eba5d6a 100644 --- a/brewman/brewman/models/client.py +++ b/brewman/brewman/models/client.py @@ -22,7 +22,7 @@ class Client(Base): code: int = Column("code", Integer, unique=True, nullable=False) name: str = Column("name", Unicode(255), unique=True, nullable=False) enabled: bool = Column("enabled", Boolean, nullable=False) - otp: int = Column("otp", Integer) + otp: Optional[int] = Column("otp", Integer) creation_date: datetime = Column("creation_date", DateTime(), nullable=False) login_history: List["LoginHistory"] = relationship( @@ -34,7 +34,7 @@ class Client(Base): code: int, name: str, enabled: bool, - otp: int, + otp: Optional[int], creation_date: Optional[datetime] = None, id_: Optional[uuid.UUID] = None, ) -> None: