fixed some api and import stuff
This commit is contained in:
parent
d0506c2a95
commit
1c942f0be7
3 changed files with 11 additions and 1 deletions
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
# Next Release
|
# Next Release
|
||||||
|
|
||||||
|
* Added proper minion job support
|
||||||
|
* **Admin Feature** Added importing of CSVs from Lancaster City Council
|
||||||
|
* Added pagination support to searching of organisations during transaction submission in API
|
||||||
|
|
||||||
# v0.10.9
|
# v0.10.9
|
||||||
|
|
||||||
* Removed sector list from dashboard stats and swapped it for category list
|
* Removed sector list from dashboard stats and swapped it for category list
|
||||||
|
|
|
@ -265,6 +265,7 @@ sub post_search {
|
||||||
$validation->input( $c->stash->{api_json} );
|
$validation->input( $c->stash->{api_json} );
|
||||||
|
|
||||||
$validation->required('search_name');
|
$validation->required('search_name');
|
||||||
|
$validation->optional('page')->number;
|
||||||
|
|
||||||
return $c->api_validation_error if $validation->has_error;
|
return $c->api_validation_error if $validation->has_error;
|
||||||
|
|
||||||
|
@ -276,6 +277,11 @@ sub post_search {
|
||||||
my $valid_orgs_rs = $org_rs->search({
|
my $valid_orgs_rs = $org_rs->search({
|
||||||
pending => 0,
|
pending => 0,
|
||||||
entity_id => { "!=" => $user->entity_id },
|
entity_id => { "!=" => $user->entity_id },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
page => $validation->param('page') || 1,
|
||||||
|
rows => 10,
|
||||||
|
order_by => { -desc => 'name' },
|
||||||
})->search(
|
})->search(
|
||||||
\$search_stmt,
|
\$search_stmt,
|
||||||
);
|
);
|
||||||
|
|
|
@ -19,7 +19,7 @@ sub import_csv {
|
||||||
my ($self) = @_;
|
my ($self) = @_;
|
||||||
|
|
||||||
my $rows = $self->csv_data;
|
my $rows = $self->csv_data;
|
||||||
|
my $lcc_org = $self->schema->resultset('Organisation')->find({ name => "Lancashire County Council" });
|
||||||
foreach my $row ( @{$rows} ) {
|
foreach my $row ( @{$rows} ) {
|
||||||
$self->_row_to_result($row);
|
$self->_row_to_result($row);
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue