[Koha-bugs] [Bug 17371] REST API: add CRUD for biblios
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Sun Jan 15 17:20:01 CET 2017
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17371
--- Comment #10 from Jiri Kozlovsky <mail at jkozlovsky.cz> ---
(In reply to Jiri Kozlovsky from comment #7)
> Comment on attachment 55898 [details] [review]
> Bug 17371 - REST API: add CRUD for biblios
>
> Review of attachment 55898 [details] [review]:
> -----------------------------------------------------------------
>
> Nice work by the way!
>
> ::: Koha/REST/V1/Biblio.pm
> @@ +45,5 @@
> > + my $biblio = Koha::Biblios->find($args->{biblionumber});
> > + unless ($biblio) {
> > + return $c->$cb({error => "Biblio not found"}, 404);
> > + }
> > + return $c->$cb({ biblio => $biblio->unblessed, items => $biblio->items->unblessed }, 200);
>
> Does this respect OpacHiddenItems preference?
I'm going to implement this in next patch - basically just migrate completed
work from bug 17007 so that it can be closed as duplicate. This bug has much
more to offer.
>
> @@ +79,5 @@
> > +
> > + # mark as onhold if item marked as hold
> > + if (scalar(@{$holds}) > 0) {
> > + $item->{status} = "onhold";
> > + }
>
> I'm missing the next statement after one of the conditions succeeds. I can
> see no reason to check for another condition, which can result in not
> necessary DB querying.
I've probably misunderstood something - now I can't see anything being wrong
about this chunk of code.
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
More information about the Koha-bugs
mailing list