Subject: | Patch for having HTML::Widget::DBIC work with HTML::Widget::Element::Upload |
Hello,
I think my colleague Kaare has mailed this patch to you, but now I am
submitting it the formal way also so others can benefit from it until
it's destiny is sealed :)
The patch fixes some collaboration trouble with
HTML::Widget::Element::Upload, which we have experienced with
HTML::Widget::Upload.
jonasbn
Subject: | DBIC.pm.patch |
--- DBIC.pm 2006-10-09 09:03:51.000000000 +0200
+++ DBIC.pm.new 2007-02-21 14:42:43.000000000 +0100
@@ -99,7 +99,8 @@
@options = _get_options( $schema->resultset( $col->{foreign_class} ) );
}
my $element = _make_elem( $self, $col, @options );
- $element->value( _getval($item, $col, $schema) ) if $item;
+ $element->value( _getval($item, $col, $schema) ) if $item &&
+ $element->can('value');
_make_constraints( $self, $col );
}
$self->{dbic_config} = $config;