Bug 36159: (QA follow-up): Simplify code to supress warnings

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Kyle M Hall 2024-03-28 06:20:29 -04:00 committed by Katrin Fischer
parent 67680d5d6a
commit 22d51cdd07
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 4 additions and 2 deletions

View File

@ -385,8 +385,10 @@ sub store {
my @skip_fields = (qw/lastseen updated_on/);
for my $key ( keys %{$from_storage} ) {
next if any { /$key/ } @skip_fields;
if ( ( $from_storage->{$key} || $from_object->{$key} )
&& ( $from_storage->{$key} ne $from_object->{$key} ) )
my $storage_value = $from_storage->{$key} // q{};
my $object_value = $from_object->{$key} // q{};
if ( ( $storage_value || $object_value )
&& ( $storage_value ne $object_value ) )
{
$info->{$key} = {
before => $from_storage->{$key},