From 8625eefc76a9390e28e9136f19b9767814bc27a5 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 Signed-off-by: Tomas Cohen Arazi Signed-off-by: Nick Clemens --- 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.39.5