Skip Menu |

This queue is for tickets about the Maypole CPAN distribution.

Report information
The Basics
Id: 7917
Status: resolved
Priority: 0/
Queue: Maypole

People
Owner: Nobody in particular
Requestors: kconnor [...] proofpoint.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.7
Fixed in: (no value)



Subject: Maypole::Model::CDBI on DBI error when creating resets template to edit instead of addnew
Maypole/Model/CDBI.pm if (my %errors = $obj->cgi_update_errors) { # Set it up as it was: $r->{template_args}{cgi_params} = $r->{params}; $r->{template_args}{errors} = \%errors; $r->{template} = "edit"; undef $obj if $creating; # Couldn't create } else { at least in the BeerDB demo app, edit isn't meant for and doesn't handle creation. as far as a reproducible goes, I was playing around with an add_contraint condition which failed. I would think failing an untaint, etc would do the same.
Hi Kevin, This is fixed in Maypole 2.05 which will be released later this week. If object creation fails, it will set the template to 'addnew'. Thanks Simon