Fix: Users could not be added as password was not supplied in the BlankUser schema and it gave an error

This commit is contained in:
Amritanshu Agrawal 2021-04-02 18:43:17 +05:30
parent 15be0d5009
commit d54c5a5cf9

View File

@ -212,6 +212,7 @@ def user_info(item: User, db: Session, user: UserToken) -> schemas.User:
def user_blank(db: Session) -> schemas.UserBlank:
return schemas.UserBlank(
name="",
password="",
lockedOut=False,
roles=[schemas.RoleItem(id=r.id, name=r.name, enabled=False) for r in db.query(Role).order_by(Role.name).all()],
)