Bug 35929: Remove extra parenthesis

and make it more readable

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Jonathan Druart 2024-05-22 09:52:04 +02:00 committed by Katrin Fischer
parent cf4a3667cb
commit ad41c672a1
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 4 additions and 2 deletions

View File

@ -575,9 +575,11 @@ sub DelUnchangedFields {
# get the hidden fields so we don't obliterate them should they have data patrons aren't allowed to modify
my $hidden_fields = GetHiddenFields($mandatory, 'edit');
foreach my $key ( keys %new_data ) {
next if ( ($new_data{$key} || $current_data->{$key}) && ( $new_data{$key} ne $current_data->{$key} ) && !($hidden_fields->{$key}) );
next
if ( $new_data{$key} || $current_data->{$key} )
&& $new_data{$key} ne $current_data->{$key}
&& !$hidden_fields->{$key};
delete $new_data{$key};
}