@@ -, +, @@ --- Koha/Patron.pm | 4 ---- about.pl | 4 ---- t/db_dependent/Koha/Patrons.t | 6 +----- 3 files changed, 1 insertion(+), 13 deletions(-) --- a/Koha/Patron.pm +++ a/Koha/Patron.pm @@ -202,10 +202,6 @@ sub store { $self->surname( uc($self->surname) ) if C4::Context->preference("uppercasesurnames"); - $self->relationship(undef) # We do not want to store an empty string in this field - if defined $self->relationship - and $self->relationship eq ""; - unless ( $self->in_storage ) { #AddMember # Generate a valid userid/login if needed --- a/about.pl +++ a/about.pl @@ -491,8 +491,6 @@ $template->param( 'bad_yaml_prefs' => \@bad_yaml_prefs ) if @bad_yaml_prefs; SELECT COUNT(*) FROM ( SELECT relationship FROM borrower_relationships WHERE relationship='_bad_data' - UNION ALL - SELECT relationship FROM borrowers WHERE relationship='_bad_data') a }); $bad_relationships_count = $bad_relationships_count->[0]->[0]; @@ -501,8 +499,6 @@ $template->param( 'bad_yaml_prefs' => \@bad_yaml_prefs ) if @bad_yaml_prefs; SELECT DISTINCT(relationship) FROM ( SELECT relationship FROM borrower_relationships WHERE relationship IS NOT NULL - UNION ALL - SELECT relationship FROM borrowers WHERE relationship IS NOT NULL) a }); my %valid_relationships = map { $_ => 1 } split( /,|\|/, C4::Context->preference('borrowerRelationship') ); --- a/t/db_dependent/Koha/Patrons.t +++ a/t/db_dependent/Koha/Patrons.t @@ -1661,7 +1661,7 @@ subtest 'Test Koha::Patrons::merge' => sub { }; subtest '->store' => sub { - plan tests => 7; + plan tests => 6; my $schema = Koha::Database->new->schema; $schema->storage->txn_begin; @@ -1700,10 +1700,6 @@ subtest '->store' => sub { is( $patron_1->surname, $surname, 'Surname remains unchanged on store.'); - # Test relationship - $patron_1->relationship("")->store; - is( $patron_1->relationship, undef, ); - $schema->storage->dbh->{PrintError} = $print_error; $schema->storage->txn_rollback; --