d.oliveira at prozone
Jan 18, 2010, 9:25 AM
Error creating new contact
I was trying to create a new contact via Bricolage API using Bric::Biz::Contact->edit_type() and got the error:
Unable to execute SQL statement: DBD::Pg::st execute failed: ERROR: column "alertable" is of type boolean but expression is of type integer
LINE 2: ...SERT INTO contact (id, type, description, active, alertable)
HINT: You will need to rewrite or cast the expression.
[.for Statement "
INSERT INTO contact (id, type, description, active, alertable)
VALUES (NEXTVAL('seq_contact'), ?, ?, ?, 0)
" with ParamValues: 1='Citizen ID', 3='1', 2='Citizen card number'] at /servers/bricolage/lib/Bric/Util/DBI.pm line 1084.
The problem was fixed by sending the zero value to the prepared statement parameters. Find the attached patch.
<d.oliveira [at] prozone>