rename get_distinct to get_distinct_col
This commit is contained in:
@@ -388,7 +388,7 @@ sub get_releases {
|
||||
|
||||
}
|
||||
|
||||
=head2 get_distinct( $column )
|
||||
=head2 get_distinct_col( $column )
|
||||
|
||||
Returns an asciibetical sorted list of the distinct values in the given column
|
||||
of the Device table. This is useful for web forms when you want to provide a
|
||||
@@ -396,7 +396,7 @@ drop-down list of possible options.
|
||||
|
||||
=cut
|
||||
|
||||
sub get_distinct {
|
||||
sub get_distinct_col {
|
||||
my ($rs, $col) = @_;
|
||||
return $rs unless $col;
|
||||
|
||||
|
||||
@@ -235,13 +235,13 @@ get '/search' => sub {
|
||||
|
||||
# used in the device search sidebar to populate select inputs
|
||||
var('model_list' => [
|
||||
schema('netdisco')->resultset('Device')->get_distinct('model')
|
||||
schema('netdisco')->resultset('Device')->get_distinct_col('model')
|
||||
]);
|
||||
var('os_ver_list' => [
|
||||
schema('netdisco')->resultset('Device')->get_distinct('os_ver')
|
||||
schema('netdisco')->resultset('Device')->get_distinct_col('os_ver')
|
||||
]);
|
||||
var('vendor_list' => [
|
||||
schema('netdisco')->resultset('Device')->get_distinct('vendor')
|
||||
schema('netdisco')->resultset('Device')->get_distinct_col('vendor')
|
||||
]);
|
||||
|
||||
# list of tabs
|
||||
|
||||
Reference in New Issue
Block a user