Bug 24370: Allow resetting library to ANY
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 25 Aug 2021 11:55:36 +0000 (13:55 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 2 Nov 2021 13:57:04 +0000 (14:57 +0100)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
suggestion/suggestion.pl

index 27a263c..5f69087 100755 (executable)
@@ -180,6 +180,9 @@ if ( $op =~ /save/i ) {
 
             $suggestion_only->{lastmodificationdate} = dt_from_string;
             $suggestion_only->{lastmodificationby}   = C4::Context->userenv->{number};
+            $suggestion_only->{branchcode} = undef
+              if exists $suggestion_only->{branchcode}
+              && $suggestion_only->{branchcode} eq "";
 
             &ModSuggestion($suggestion_only);