LP#1778571 Fix logic error converting JS bool to DB bool