Ignore:
Timestamp:
10/14/15 20:21:41 (9 years ago)
Author:
nanardon
Message:

Fix attribute setting at object creation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Create.pm

    r1333 r1420  
    4545    foreach my $attr (@{$info->{ask} || []}) { 
    4646        my $field = $form->field($attr); 
    47         my @vals = $c->req->param($field->attr_field_name()); 
    48         $info->{contents}{$attr} = @vals > 1 ? \@vals : $vals[0]; 
     47        my @vals = grep { $_ } $c->req->param($field->attr_field_name()); 
     48        $info->{contents}{$attr} = @vals > 1 ? \@vals : $vals[0] 
     49            if (@vals); 
    4950    } 
    5051    my $ochelper = $base->ochelper($otype); 
Note: See TracChangeset for help on using the changeset viewer.