Error cb.apply is not a function from PostgresSQL Database Action Script Template