From: Sven Schöling Date: Fri, 12 Jul 2013 13:20:36 +0000 (+0200) Subject: Partpicker: Nicht kaputtgehen ohne default part. X-Git-Tag: release-3.1.0beta1~174 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=20576aace01f0cdff60221c1d58032fbfc189050;p=kivitendo-erp.git Partpicker: Nicht kaputtgehen ohne default part. --- diff --git a/SL/Presenter/Part.pm b/SL/Presenter/Part.pm index 599d09356..fff9f5ee7 100644 --- a/SL/Presenter/Part.pm +++ b/SL/Presenter/Part.pm @@ -10,7 +10,7 @@ our @EXPORT = qw(part_picker); sub part_picker { my ($self, $name, $value, %params) = @_; - $value = SL::DB::Manager::Part->find_by(id => $value) if !ref $value; + $value = SL::DB::Manager::Part->find_by(id => $value) if $value && !ref $value; my $id = delete($params{id}) || $self->name_to_id($name); my $ret =