projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
59b35cf
)
SL::DB::CustomVariable->value: undef anstelle von 0 wenn ref.Objekt nicht existiert
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Tue, 25 Nov 2014 12:51:10 +0000
(13:51 +0100)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Tue, 25 Nov 2014 12:51:10 +0000
(13:51 +0100)
SL/DB/CustomVariable.pm
patch
|
blob
|
history
diff --git
a/SL/DB/CustomVariable.pm
b/SL/DB/CustomVariable.pm
index
7e6b500
..
4be4b6e
100644
(file)
--- a/
SL/DB/CustomVariable.pm
+++ b/
SL/DB/CustomVariable.pm
@@
-64,17
+64,17
@@
sub value {
require SL::DB::Customer;
my $id = int($self->number_value);
require SL::DB::Customer;
my $id = int($self->number_value);
- return $id ? SL::DB::Customer->new(id => $id)->load() :
0
;
+ return $id ? SL::DB::Customer->new(id => $id)->load() :
undef
;
} elsif ( $type eq 'vendor' ) {
require SL::DB::Vendor;
my $id = int($self->number_value);
} elsif ( $type eq 'vendor' ) {
require SL::DB::Vendor;
my $id = int($self->number_value);
- return $id ? SL::DB::Vendor->new(id => $id)->load() :
0
;
+ return $id ? SL::DB::Vendor->new(id => $id)->load() :
undef
;
} elsif ( $type eq 'part' ) {
require SL::DB::Part;
my $id = int($self->number_value);
} elsif ( $type eq 'part' ) {
require SL::DB::Part;
my $id = int($self->number_value);
- return $id ? SL::DB::Part->new(id => $id)->load() :
0
;
+ return $id ? SL::DB::Part->new(id => $id)->load() :
undef
;
}
goto &text_value; # text, textfield, date and select
}
goto &text_value; # text, textfield, date and select