Bug 40802

Summary: cleanup_database is broken with ChildNeedsGuarantor
Product: Koha Reporter: Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski>
Component: Command-line UtilitiesAssignee: Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski>
Status: ASSIGNED --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: robin
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Baptiste Wojtkowski (bwoj) 2025-09-12 14:37:58 UTC
Steps to reproduce :
1 - Have a child expired patron expired for more than the content of LockExpiredDelay syspref
2 - Set syspref to "childneedsguarantor"
3 - Run /home/koha/src/misc/cronjobs/cleanup_database.pl 
You will get an uncaught error
Comment 1 Baptiste Wojtkowski (bwoj) 2025-09-12 14:46:55 UTC
Note: the error is :

> $ ~/src/misc/cronjobs/cleanup_database.pl --confirm
> [Child patron needs a guarantor]