Bug 21610: (QA follow-up) Better use columns_info from DBIx
We should better use the published method than a private hash key.
And shorter to go via _result than adding a new schema call.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8625eefc76)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
2e4883bdc5
commit
b1af157152
|
|
@ -121,8 +121,7 @@ Returns:
|
|||
sub store {
|
||||
my ($self) = @_;
|
||||
|
||||
my $columns_info = Koha::Database->new->schema->resultset( $self->_type )
|
||||
->result_source->{_columns};
|
||||
my $columns_info = $self->_result->result_source->columns_info;
|
||||
|
||||
# Handle not null and default values for integers and dates
|
||||
foreach my $col ( keys %{$columns_info} ) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue