X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/26813507465a6fd209cd902c33a16974627e9670..a615812c73cf5b07005b4f56aae5aa1da8357ee9:/SL/Controller/Helper/GetModels/Sorted.pm diff --git a/SL/Controller/Helper/GetModels/Sorted.pm b/SL/Controller/Helper/GetModels/Sorted.pm index c20dc3f07..3b03e04f7 100644 --- a/SL/Controller/Helper/GetModels/Sorted.pm +++ b/SL/Controller/Helper/GetModels/Sorted.pm @@ -76,6 +76,12 @@ sub finalize { my %sort_params = $self->read_params; my $sort_spec = $self->specs->{ $sort_params{sort_by} }; + if (!$sort_spec) { + no warnings 'once'; + $::lxdebug->show_backtrace(1); + die "Unknown sort spec '$sort_params{sort_by}'"; + } + $params{sort_by} = "SL::DB::Manager::$sort_spec->{model}"->make_sort_string(sort_by => $sort_spec->{model_column}, sort_dir => $sort_params{sort_dir}); %params; @@ -248,8 +254,6 @@ reference is the value. =back -=back - =head1 INSTANCE FUNCTIONS These functions are called on a C instance and delegating to this plugin.