Ignore:
Timestamp:
08/18/15 16:18:53 (9 years ago)
Author:
nanardon
Message:

Fix form pre-filled with default values

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Model/AttrForms.pm

    r1365 r1394  
    228228 
    229229 
    230     foreach (@{ $forms->{$form}->{attrs} }) { 
    231         $new->{_attr}{$_} = $c->model('AttrFormsA', $_, ($object 
    232                 ? ($object) 
    233                 : ($base, $new->{otype}))) 
    234             or die "Cannot get attribute $_"; 
     230    if ($form) { 
     231        foreach (@{ $forms->{$form}->{attrs} }) { 
     232            $new->{_attr}{$_} = $c->model('AttrFormsA', $_, ($object 
     233                    ? ($object) 
     234                    : ($base, $new->{otype}))) 
     235                or die "Cannot get attribute $_"; 
     236        } 
    235237    } 
    236238 
Note: See TracChangeset for help on using the changeset viewer.