Bugzilla – Attachment 144952 Details for
Bug 31798
Add POST endpoint for Items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31798: (follow-up) Tidy up camel cased variables and unnecessary checks
Bug-31798-follow-up-Tidy-up-camel-cased-variables-.patch (text/plain), 1.19 KB, created by
Agustín Moyano
on 2023-01-03 17:44:27 UTC
(
hide
)
Description:
Bug 31798: (follow-up) Tidy up camel cased variables and unnecessary checks
Filename:
MIME Type:
Creator:
Agustín Moyano
Created:
2023-01-03 17:44:27 UTC
Size:
1.19 KB
patch
obsolete
>From 2ab712d163a8e9721d22e2180032e3160f856ccc Mon Sep 17 00:00:00 2001 >From: Agustin Moyano <agustinmoyano@theke.io> >Date: Tue, 3 Jan 2023 12:12:39 -0300 >Subject: [PATCH] Bug 31798: (follow-up) Tidy up camel cased variables and > unnecessary checks > >--- > Koha/REST/V1/Biblios.pm | 15 +++------------ > 1 file changed, 3 insertions(+), 12 deletions(-) > >diff --git a/Koha/REST/V1/Biblios.pm b/Koha/REST/V1/Biblios.pm >index 2cc70b7151..2a36f2487c 100644 >--- a/Koha/REST/V1/Biblios.pm >+++ b/Koha/REST/V1/Biblios.pm >@@ -310,21 +310,12 @@ sub add_item { > $item->barcode($barcode); > } > >- if ( defined $item->barcode >- && Koha::Items->search( { barcode => $item->barcode } )->count ) >- { >- return $c->render( >- status => 400, >- openapi => { error => "Barcode not unique" } >- ); >- } >- >- my $storedItem = $item->store; >- $storedItem->discard_changes; >+ my $stored_item = $item->store; >+ $stored_item->discard_changes; > > $c->render( > status => 201, >- openapi => $storedItem->to_api >+ openapi => $stored_item->to_api > ); > } > catch { >-- >2.25.1
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 31798
:
144893
|
144894
|
144952
|
144953
|
144956
|
147463
|
147464
|
147655
|
147656
|
147657
|
150598
|
150599
|
150600
|
150771
|
150772
|
150773
|
150774
|
150775