Bug 33671: Update POD, remove unneeded check in relationship->guarantor

[1] Update POD for $patron->guarantor_relationships
[2] Remove check from Patron::Relationship->guarantor

Test plan:
Run t/db_dependent/Koha/Patron.t
Run t/db_dependent/Patron/Relationships.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Marcel de Rooy 2023-05-04 07:06:07 +00:00 committed by Tomas Cohen Arazi
parent 1dee35d412
commit 5eaee314c5
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
2 changed files with 4 additions and 8 deletions

View file

@ -471,9 +471,9 @@ Returns Koha::Patron::Relationships object for this patron's guarantors
Returns the set of relationships for the patrons that are guarantors for this patron.
This is returned instead of a Koha::Patron object because the guarantor
may not exist as a patron in Koha. If this is true, the guarantors name
exists in the Koha::Patron::Relationship object and will have no guarantor_id.
Note that a guarantor should exist as a patron in Koha; it was not possible
to add them without a guarantor_id in the interface for some time. Bug 30472
restricts it on db level.
=cut

View file

@ -73,15 +73,12 @@ sub store {
=head3 guarantor
Returns the Koha::Patron object for the guarantor, if there is one
Returns the Koha::Patron object for the guarantor
=cut
sub guarantor {
my ( $self ) = @_;
return unless $self->guarantor_id;
return Koha::Patrons->find( $self->guarantor_id );
}
@ -93,7 +90,6 @@ Returns the Koha::Patron object for the guarantee
sub guarantee {
my ( $self ) = @_;
return Koha::Patrons->find( $self->guarantee_id );
}