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: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com CC: tomascohen@gmail.com 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.