Mypy: The OTP Field is nullable

This commit is contained in:
Amritanshu Agrawal 2021-11-23 09:57:09 +05:30
parent 997f47aa58
commit 0b9ffc652b
1 changed files with 2 additions and 2 deletions

View File

@ -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: