Postgresql Invalid Input Syntax For Type Boolean In Python