Fixed issue with Importset for users and orgs trying to much data for
the group by
This commit is contained in:
parent
cb9c219b27
commit
6d138af016
1 changed files with 19 additions and 2 deletions
|
@ -23,12 +23,28 @@ sub get_values {
|
|||
);
|
||||
}
|
||||
|
||||
sub _unordered_get_values {
|
||||
my $self = shift;
|
||||
my $id = shift;
|
||||
my $include_ignored = shift;
|
||||
my $include_imported = shift;
|
||||
|
||||
return $self->find($id)->search_related(
|
||||
'values',
|
||||
{
|
||||
( $include_ignored ? () : ( ignore_value => 0 ) ),
|
||||
( $include_imported ? () : ( transaction_id => undef ) ),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
sub get_users {
|
||||
my $self = shift;
|
||||
|
||||
return $self->get_values(@_)->search({},
|
||||
return $self->_unordered_get_values(@_)->search({},
|
||||
{
|
||||
group_by => 'user_name',
|
||||
columns => [ qw/ user_name / ],
|
||||
},
|
||||
);
|
||||
}
|
||||
|
@ -36,9 +52,10 @@ sub get_users {
|
|||
sub get_orgs {
|
||||
my $self = shift;
|
||||
|
||||
return $self->get_values(@_)->search({},
|
||||
return $self->_unordered_get_values(@_)->search({},
|
||||
{
|
||||
group_by => 'org_name',
|
||||
columns => [ qw/ org_name / ],
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
Reference in a new issue