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

Johanna Räisä <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #10 from Johanna Räisä <[email protected]> ---
This fix has not resolved the actual problem; we are still seeing similar
errors in the SIP logs.

The main issue is that the code is calling checkouts like this:
Koha::Checkouts->find({ itemnumber => $item->itemnumber });
However, the find method expects a primary key value, not a hashref for
searching by other fields.

A better approach is to use the search method, like this:
Koha::Checkouts->search({ itemnumber => $item->itemnumber })->next;
This ensures the code works correctly even if the database schema changes,
making it more robust and future-proof.

-- 
You are receiving this mail because:
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