From 20576aace01f0cdff60221c1d58032fbfc189050 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Fri, 12 Jul 2013 15:20:36 +0200 Subject: [PATCH] Partpicker: Nicht kaputtgehen ohne default part. --- SL/Presenter/Part.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = -- 2.20.1