https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35167

            Bug ID: 35167
           Summary: GET /items* broken if notforloan == 0
 Change sponsored?: ---
           Product: Koha
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P5 - low
         Component: REST API
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

The Koha::Item->to_api method has this (modded for readability):

$overrides->{effective_not_for_loan_status} =
         $self->notforloan 
             ? $self->notforloan
             : $self->itemtype->notforloan;

This is weird, because on the table definition, that column is defined as NOT
NULL:

  `notforloan` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'authorized value defining
why this item is not for loan (MARC21 952$7)',

so, if the item has a value of '0', then it will look for the itemtype's
default `notforloan` value, which can be (and most of the time is) NULL!

I will provide a patch checking 'defined $self->notforloan' but it feels like
adding `effective_not_for_loan_status` was a mistake.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to