Bug 36159: (QA follow-up) Tidy code

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Kyle M Hall 2024-03-29 07:21:20 -04:00 committed by Katrin Fischer
parent 9c731a75a9
commit f44134a1ff
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
2 changed files with 13 additions and 4 deletions

View File

@ -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{};

View File

@ -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;