Fixed issue with Importset for users and orgs trying to much data for
the group by
This commit is contained in:
parent
1fc275022a
commit
d718cfee42
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 {
|
sub get_users {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
|
||||||
return $self->get_values(@_)->search({},
|
return $self->_unordered_get_values(@_)->search({},
|
||||||
{
|
{
|
||||||
group_by => 'user_name',
|
group_by => 'user_name',
|
||||||
|
columns => [ qw/ user_name / ],
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -36,9 +52,10 @@ sub get_users {
|
||||||
sub get_orgs {
|
sub get_orgs {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
|
||||||
return $self->get_values(@_)->search({},
|
return $self->_unordered_get_values(@_)->search({},
|
||||||
{
|
{
|
||||||
group_by => 'org_name',
|
group_by => 'org_name',
|
||||||
|
columns => [ qw/ org_name / ],
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue