fixed small bug in flask app related to python-psql commands