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:
Marcel de Rooy 2018-10-19 11:05:50 +02:00 committed by Martin Renvoize
parent 2e4883bdc5
commit b1af157152
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 1 additions and 2 deletions

View File

@ -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} ) {