Bug 22907: Remove previous code handling the same thing

See:
  commit a71b96295f
  Bug 12627: Fix default values

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2019-05-14 12:27:25 -05:00 committed by Nick Clemens
parent 2329d2ea83
commit 8fed07826e
1 changed files with 0 additions and 31 deletions

View File

@ -437,20 +437,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};
@ -526,23 +512,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;