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

            Bug ID: 32801
           Summary: /checkouts?checked_in=1 errors when itemnumber is null
 Change sponsored?: ---
           Product: Koha
           Version: 21.11
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: REST API
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

When trying to fetch checked_in checkouts for a borrower, if the old_issues
doesn't have an itemnumber (for example the item was deleted).
It brings a 500 error.

This is a message I got while querying this url :
/api/v1/checkouts?patron_id=13662&checked_in=1

<pre>
{"errors":[{"message":"Expected integer - got
null.","path":"\/0\/item_id"},{"message":"Expected integer - got
null.","path":"\/1\/item_id"},{"message":"Expected integer - got
null.","path":"\/9\/item_id"},{"message":"Expected integer - got
null.","path":"\/12\/item_id"},{"message":"Expected integer - got
null.","path":"\/13\/item_id"},{"message":"Expected integer - got
null.","path":"\/14\/item_id"},{"message":"Expected integer - got
null.","path":"\/15\/item_id"}],"status":200}
</pre>

Querying with itemnumber not null solves the issue :
/api/v1/checkouts?patron_id=13662&checked_in=1&q={"item_id":{"-not_like":"null"}}

-- 
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