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

Oleg Vasylenko <[email protected]> changed:

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

--- Comment #14 from Oleg Vasylenko <[email protected]> ---
I had the same problem and solved it with this code:
UPDATE borrowers SET date_renewed = NULL where date_renewed = "0000-00-00";

But lately I started receiving the same error 500 "Month out of range" on Koha
23.11. I checked if date_renewed contains wrong data but the problem was not
with this column.

/var/log/koha/lib/plack-api-error.log showed me the problem:
[2024/08/12 16:15:44] [WARN] OpenAPI >>> GET api/v1/patrons [{"message":"Month
out of range.","path":"\/body\/1\/last_seen"},{"message":"Month out of
range.","path":"\/body\/12\/last_seen"},{"message":"Month out of
range.","path":"\/body\/14\/last_seen"},{"message":"Month out of
range.","path":"\/body\/16\/last_seen"},{"message":"Month out of
range.","path":"\/body\/18\/last_seen"},{"message":"Month out of
range.","path":"\/body\/19\/last_seen"},{"message":"Month out of
range.","path":"\/body\/5\/last_seen"},{"message":"Month out of
range.","path":"\/body\/7\/last_seen"},{"message":"Month out of
range.","path":"\/body\/8\/last_seen"},{"message":"Month out of
range.","path":"\/body\/9\/last_seen"}]

So the problem was with column last_seen. You can use this SQL to check for a
possible problem with data:
SELECT count(*) FROM borrowers WHERE lastseen = "0000-00-00";

If this SQL returns 0, then there is no problem. If not, then you can solve it
with SQL:
UPDATE borrowers SET lastseen = NULL where lastseen = "0000-00-00";

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
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