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>
(cherry picked from commit ad41c672a1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Jonathan Druart 2024-05-22 09:52:04 +02:00 committed by Fridolin Somers
parent 1a898d9464
commit ae53cf4eea
1 changed files with 4 additions and 2 deletions

View File

@ -590,9 +590,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};
}