Move the delete test after the new test, so that there's an object

to pull from the db.  Sheesh.
Remove the id generation from inside the private build method
and make sure it returns the built object.
This commit is contained in:
Colin Kuskie 2008-02-23 06:17:39 +00:00
parent 669bb870eb
commit 39aa431e2c
2 changed files with 21 additions and 16 deletions

View file

@ -49,7 +49,6 @@ sub _buildObj {
bless $self, $class;
register $self;
my $shipperId = $session->id->generate;
my $id = id $self;
$session{ $id } = $session;
@ -207,7 +206,7 @@ sub new {
unless exists $properties->{options} and $properties->{options};
my $options = from_json($properties->{options});
my $self = WebGUI::Shop::ShipDriver->_buildObj($session, $shipperId, $options);
return;
return $self;
}
#-------------------------------------------------------------------