mongodb-labs / full-stack-fastapi-mongodb

Full stack, modern web application generator. Using FastAPI, MongoDB as database, Docker, automatic HTTPS and more.
MIT License
457 stars 81 forks source link

running example Error: Type error: This kind of expression is always truthy. #55

Closed shouari closed 4 hours ago

shouari commented 4 hours ago

hello while running the exmaple (docker compose build) I'm constanatly facing this error Type error: This kind of expression is always truthy. Can anyone help with this?

Screenshot for ref. image

shouari commented 4 hours ago

Issue was solved by changing from this code: `switch (condition) { case "required": return

This field is required.
; case "minLength" || "maxLength": return (

Your password must be between 8 and 64 characters long.
    );

}`

to this: `switch (condition) { case "required": return

This field is required.
; case "minLength": case "maxLength": return (

Your password must be between 8 and 64 characters long.
    );

}` in the indicated files. There are 3 or 4 to be corrected