Gossamer Forum
Home : Products : Gossamer Links : Discussions :

bug with Table.pm _check_insert

Quote Reply
bug with Table.pm _check_insert
Hi there,

I believe I've found a minor glitch in the GT::SQL::Table::_check_insert routine.

On about line 1897 is this line:
$self->warn(NOTNULL => $col->{form_display} || $c);

presumably this loads into self that the column can't be left blank
BUT,
that happens again because:
sub _check_insert later on calls
sub check_values which calls
sub _check_update which calls
sub _check_value And this routine starts by checking for notnull values also and writes:
$self->warn(NOTNULL => $column->{form_display} || $name);

The result is that when running check insert any missing fields are included twice. So in $db->error we end up with:
  • Column Title can not be left blank
  • Column Description can not be left blank
  • Column Title can not be left blank
  • Column Description can not be left blank
Thought you should know.

peace.
Quote Reply
Re: [klangan] bug with Table.pm _check_insert In reply to
Sorry about the really late reply, I've had this post in my todo list for a while, and I've finally gotten a chance to take a closer look at it. After a bit of digging and analysis, I've found that there's actually a few other issues with the various bits of not_null checking in the code (as well as some bugs in some unreleased 'fixes' I had previously committed). These problems should be fixed in the next release. Thanks for bringing this to our attention.

Adrian