From 0b19f3b8b5d7c006e908e643fcea0cabf2c67b2b 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 --- 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 3e9211be475..3778be79376 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 ca186941b7a..68ea342a6e3 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.30.2