Bug 29204: Fix reports/issues_stats.pl for MySQL 8
[koha-ffzg.git] / 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);