From 29808047b98da3c639575486552e3faa45b358a5 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 19 Oct 2018 11:05:50 +0200 Subject: [PATCH] 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 Signed-off-by: Kyle M Hall --- Koha/Object.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Koha/Object.pm b/Koha/Object.pm index 65790eb411..d388eadbdf 100644 --- a/Koha/Object.pm +++ b/Koha/Object.pm @@ -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} ) { -- 2.20.1