Closed ghost closed 3 years ago
I'll merge this, but it seems we should use borrower_relationships table when the column doesn't exist, right?
Yes, and actually we are already using it, the call $patron->guarantee_relationships just below this code fetches the info from borrower_relationships table. Actually most likely the relationship column here has been empty for a long time now but Koha's git history didn't go so far as when the column was first introduced so I was unable to verify it is is completely empty for all Koha installations. In bug 26995 the column was actually just simply removed but I didn't want to do it here in case there are some API users with relationship column populated and have not yet migrated the data to borrower_relationships manually.
Oh, right. Thanks for the explanation.
The current Koha master version doesn't contain anymore the borrowers.relationship column (Bug 26995). This checks (hackily) via relationship_type hash key whether the column still exists or not and only calls $patron->relationship if it exists. Without this check we get the following error:
The method Koha::Patron->relationship is not covered by tests!