@@ -, +, @@ commit a71b96295fb07084e4f87ac1a471e89355f3c5a4 Bug 12627: Fix default values --- C4/Suggestions.pm | 31 ------------------------------- 1 file changed, 31 deletions(-) --- a/C4/Suggestions.pm +++ a/C4/Suggestions.pm @@ -435,20 +435,6 @@ Insert a new suggestion on database with value given on input arg. sub NewSuggestion { my ($suggestion) = @_; - for my $field ( qw( - suggestedby - managedby - manageddate - acceptedby - accepteddate - rejectedby - rejecteddate - budgetid - ) ) { - # Set the fields to NULL if not given. - $suggestion->{$field} ||= undef; - } - $suggestion->{STATUS} = "ASKED" unless $suggestion->{STATUS}; $suggestion->{suggesteddate} = dt_from_string unless $suggestion->{suggesteddate}; @@ -524,23 +510,6 @@ sub ModSuggestion { my ($suggestion) = @_; return unless( $suggestion and defined($suggestion->{suggestionid}) ); - for my $field ( qw( - suggestedby - managedby - manageddate - acceptedby - accepteddate - rejectedby - rejecteddate - budgetid - ) ) { - # Set the fields to NULL if not given. - $suggestion->{$field} = undef - if exists $suggestion->{$field} - and ($suggestion->{$field} eq '0' - or $suggestion->{$field} eq '' ); - } - my $suggestion_object = Koha::Suggestions->find( $suggestion->{suggestionid} ); eval { # FIXME Must raise an exception instead $suggestion_object->set($suggestion)->store; --