Through import or migrations and maybe other unknown ways you can end up with data that doesn't match the configured codes for libraries and patron categories in terms of capitalization. It would be nice to have some inconsistency checks for this in our scripts. A good starting point would be: * Check holdingbranch/homebranch in items * Check branchcode and categorycode in borrowers