Bugzilla – Attachment 173369 Details for
Bug 38204
Add `GET /acquisitions/baskets`
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38204: Tidy
Bug-38204-Tidy.patch (text/plain), 2.53 KB, created by
Tomás Cohen Arazi (tcohen)
on 2024-10-25 14:14:31 UTC
(
hide
)
Description:
Bug 38204: Tidy
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2024-10-25 14:14:31 UTC
Size:
2.53 KB
patch
obsolete
>From 0a7c81e35ae21b8570e72cb31742c37c92f8a322 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 25 Oct 2024 10:31:53 -0300 >Subject: [PATCH] Bug 38204: Tidy > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/REST/V1/Acquisitions/Baskets.pm | 13 ++++--------- > t/db_dependent/api/v1/acquisitions_baskets.t | 9 +++------ > 2 files changed, 7 insertions(+), 15 deletions(-) > >diff --git a/Koha/REST/V1/Acquisitions/Baskets.pm b/Koha/REST/V1/Acquisitions/Baskets.pm >index bcd013bb0f5..b7f39b81448 100644 >--- a/Koha/REST/V1/Acquisitions/Baskets.pm >+++ b/Koha/REST/V1/Acquisitions/Baskets.pm >@@ -47,14 +47,13 @@ sub list_managers { > return try { > > my $patrons_rs = Koha::Patrons->search->filter_by_have_permission('acquisition.order_manage'); >- my $patrons = $c->objects->search( $patrons_rs ); >+ my $patrons = $c->objects->search($patrons_rs); > > return $c->render( > status => 200, > openapi => $patrons > ); >- } >- catch { >+ } catch { > $c->unhandled_exception($_); > }; > } >@@ -70,15 +69,11 @@ sub list { > > return try { > >- my $baskets_rs = Koha::Acquisition::Baskets->new; >- my $baskets = $c->objects->search( $baskets_rs ); >- > return $c->render( > status => 200, >- openapi => $baskets >+ openapi => $c->objects->search( Koha::Acquisition::Baskets->new ), > ); >- } >- catch { >+ } catch { > $c->unhandled_exception($_); > }; > } >diff --git a/t/db_dependent/api/v1/acquisitions_baskets.t b/t/db_dependent/api/v1/acquisitions_baskets.t >index 69222a80b02..b41939a5e30 100755 >--- a/t/db_dependent/api/v1/acquisitions_baskets.t >+++ b/t/db_dependent/api/v1/acquisitions_baskets.t >@@ -86,9 +86,7 @@ subtest 'list() tests' => sub { > my $userid = $superlibrarian->userid; > $superlibrarian->discard_changes; > >- $t->get_ok("//$userid:$password@/api/v1/acquisitions/baskets")->status_is(200)->json_is( >- [] >- ); >+ $t->get_ok("//$userid:$password@/api/v1/acquisitions/baskets")->status_is(200)->json_is( [] ); > > my $vendor = $builder->build_object( > { >@@ -102,8 +100,7 @@ subtest 'list() tests' => sub { > } > ); > >- $t->get_ok("//$userid:$password@/api/v1/acquisitions/baskets")->status_is(200)->json_is( [$basket->to_api ]); >+ $t->get_ok("//$userid:$password@/api/v1/acquisitions/baskets")->status_is(200)->json_is( [ $basket->to_api ] ); > > $schema->storage->txn_rollback; >- >-} >\ No newline at end of file >+}; >-- >2.47.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38204
:
172943
|
172944
|
173020
|
173021
|
173259
|
173366
|
173367
|
173368
| 173369