Bug 36159: (QA follow-up) Tidy code
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f44134a1ff)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
c9379ddd00
commit
067522e35e
|
|
@ -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{};
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue