Updated boolean condition from 1 to true (1 doesn't work with Postgres)