Legend:
- Unmodified
- Added
- Removed
-
trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Create.pm
r1420 r1594 62 62 'Erreur lors de la création de l\'objet: ' . 63 63 LATMOS::Accounts::Log::lastmessage(LA_ERR); 64 $base->rollback; 64 65 foreach my $attr (@{$info->{ask} || []}) { 65 66 my $field = $form->field($attr); … … 73 74 $c->req->params->{$field->attr_field_name()} = $info->{contents}{$attr}; 74 75 } 76 $base->rollback; 75 77 } 76 78 $c->stash->{form} = $form; -
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases.pm
r1549 r1594 407 407 la_log(LA_INFO, 408 408 'Object %s (%s) created in base %s (%s)', 409 $id, $otype, $self->label, $self->type 409 $id, $otype, $self->label, $self->type, 410 410 ); 411 411 } else { 412 my $last = LATMOS::Accounts::Log::lastmessage(LA_ERR); 413 warn $last; 412 414 la_log(LA_ERR, 413 'Object creation %s (%s) in base %s (%s) failed', 414 $id, $otype, $self->label, $self->type 415 'Object creation %s (%s) in base %s (%s) failed%s', 416 $id, $otype, $self->label, $self->type, 417 ($last ? ": $last" : ''), 415 418 ); 416 419 return; -
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/objects.pm
r1569 r1594 265 265 my $res = $sthid->fetchrow_hashref(); 266 266 $sthid->finish; 267 $res or return; 267 $res or do { 268 $base->log(LA_DEBUG, 'Cannot retrieve SQL row from freshly create object %s/%s', $class->type, $id); 269 return; 270 }; 268 271 269 272 my $obj = $class->new($base, $res->{k}) or return; 270 $obj->_set_c_fields(%second); 273 if (keys %second) { 274 $obj->_set_c_fields(%second) or do { 275 $base->log(LA_DEBUG, 'Cannot set atttributes to freshly create object %s/%s', $class->type, $id); 276 return; 277 }; 278 } 271 279 272 280 return $res->{k};
Note: See TracChangeset
for help on using the changeset viewer.