From f44134a1ffa2de0500c22603aa85bc97df9bc25d Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 29 Mar 2024 07:21:20 -0400 Subject: [PATCH] Bug 36159: (QA follow-up) Tidy code Signed-off-by: Katrin Fischer --- Koha/Patron.pm | 2 +- t/db_dependent/Koha/Patrons.t | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Koha/Patron.pm b/Koha/Patron.pm index 3e9211be47..3778be7937 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -382,7 +382,7 @@ sub store { $from_object->{dateexpiry} = dt_from_string( $from_object->{dateexpiry} )->ymd if $from_object->{dateexpiry}; - my @skip_fields = (qw/lastseen updated_on/); + my @skip_fields = (qw/lastseen updated_on/); for my $key ( keys %{$from_storage} ) { next if any { /$key/ } @skip_fields; my $storage_value = $from_storage->{$key} // q{}; diff --git a/t/db_dependent/Koha/Patrons.t b/t/db_dependent/Koha/Patrons.t index ca186941b7..68ea342a6e 100755 --- a/t/db_dependent/Koha/Patrons.t +++ b/t/db_dependent/Koha/Patrons.t @@ -1630,10 +1630,19 @@ subtest 'BorrowersLog tests' => sub { Koha::ActionLogs->search()->delete(); $patron->get_from_storage(); - $patron->set( { debarred => "" }); + $patron->set( { debarred => "" } ); $patron->store; - my $log = Koha::ActionLogs->search( { module => 'MEMBERS', action => 'MODIFY', object => $patron->borrowernumber } )->next; - isnt( defined $log, "No action log generated where incoming changed column is empty string and value in storage is NULL" ); + my $log = Koha::ActionLogs->search( + { + module => 'MEMBERS', + action => 'MODIFY', + object => $patron->borrowernumber, + } + )->next; + isnt( + defined $log, + "No action log generated where incoming changed column is empty string and value in storage is NULL" + ); }; $schema->storage->txn_rollback; -- 2.39.5