Bugzilla – Attachment 58993 Details for
Bug 17314
Routes to create, list and delete a purchase suggestion
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
QA followup
QA-followup.patch (text/plain), 2.04 KB, created by
Jiri Kozlovsky
on 2017-01-14 22:26:12 UTC
(
hide
)
Description:
QA followup
Filename:
MIME Type:
Creator:
Jiri Kozlovsky
Created:
2017-01-14 22:26:12 UTC
Size:
2.04 KB
patch
obsolete
>From e94ee4550982c9f54d0985870ab3decd93c11598 Mon Sep 17 00:00:00 2001 >From: Jiri Kozlovsky <mail@jkozlovsky.cz> >Date: Sat, 14 Jan 2017 22:24:42 +0000 >Subject: [PATCH] QA followup > >test plan unchanged > >https://bugs.koha-community.org/show_bug.cgi?id=17314 >--- > Koha/REST/V1/Suggestions.pm | 6 ++++-- > api/v1/swagger/definitions/suggestion.json | 4 ++-- > 2 files changed, 6 insertions(+), 4 deletions(-) > >diff --git a/Koha/REST/V1/Suggestions.pm b/Koha/REST/V1/Suggestions.pm >index 2e0a9ee..bc5df3c 100644 >--- a/Koha/REST/V1/Suggestions.pm >+++ b/Koha/REST/V1/Suggestions.pm >@@ -29,6 +29,8 @@ use Koha::Suggestions; > use Koha::ItemTypes; > use Koha::Libraries; > >+use List::MoreUtils qw/any/; >+ > use Try::Tiny; > > sub list { >@@ -175,8 +177,8 @@ sub _validate_body { > } > > foreach my $param ( keys %{ $body } ) { >- unless (/^$param$/ ~~ @allowed_fields) { >- # Ouch ! Some mandatory field is missing! >+ unless (any { /^$param$/ } @allowed_fields) { >+ # Ouch ! User trying to edit field he has no rights to edit! > my $verb = $updating ? 'updated ' : 'specified '; > return $c->$cb({error => 'You ' . $verb . $param . ', but allowed fields are only ' . > join(', ', @allowed_fields)}, 403); >diff --git a/api/v1/swagger/definitions/suggestion.json b/api/v1/swagger/definitions/suggestion.json >index 12ff222..844354b 100644 >--- a/api/v1/swagger/definitions/suggestion.json >+++ b/api/v1/swagger/definitions/suggestion.json >@@ -10,7 +10,7 @@ > "description": "borrowernumber for the person making the suggestion, foreign key linking to the borrowers table" > }, > "suggesteddate": { >- "type": "string", >+ "type": ["string", "null"], > "description": "the suggestion was submitted" > }, > "managedby": { >@@ -70,7 +70,7 @@ > "description": "volume description" > }, > "publicationyear": { >- "type": "string", >+ "type": ["string", "null"], > "description": "year of publication" > }, > "place": { >-- >2.1.4
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 17314
:
58098
|
58100
|
58101
|
58993
|
60133
|
90171
|
90172
|
90176
|
91545
|
91546
|
93761
|
93762
|
93763
|
93764
|
93765
|
108380
|
109972
|
109973
|
109974
|
109975
|
109976
|
109977
|
114113
|
114114
|
114115
|
114116
|
114117
|
114118
|
120111
|
120133
|
120134
|
120135
|
120136
|
125097
|
125098
|
125099
|
125100
|
125101
|
125102
|
125103
|
125104
|
127533
|
127534
|
127535
|
127536