Warnung unterdrücken
authorSven Schöling <s.schoeling@linet-services.de>
Fri, 14 Sep 2012 11:13:37 +0000 (13:13 +0200)
committerSven Schöling <s.schoeling@linet-services.de>
Fri, 14 Sep 2012 11:13:37 +0000 (13:13 +0200)
SL/DB/Part.pm

index 952bce2..1ef2c1b 100644 (file)
@@ -55,7 +55,7 @@ __PACKAGE__->before_save('_before_save_set_partnumber');
 sub _before_save_set_partnumber {
   my ($self) = @_;
 
-  $self->create_trans_number if $self->partnumber eq '';
+  $self->create_trans_number if !$self->partnumber;
   return 1;
 }