Must set cache after updating, since the attribute clears the cache if the ids are different.

This commit is contained in:
Colin Kuskie 2010-04-06 19:10:57 -07:00
parent c549803777
commit ce39ad6a14

View file

@ -184,8 +184,9 @@ sub getStorageLocation {
my $self = shift;
unless (exists $self->{_storageLocation}) {
if ($self->storageId eq "") {
$self->{_storageLocation} = WebGUI::Storage->create($self->session);
$self->update({ storageId => $self->{_storageLocation}->getId });
my $storage = WebGUI::Storage->create($self->session);
$self->update({ storageId => $storage->getId });
$self->{_storageLocation} = $storage;
}
else {
$self->{_storageLocation} = WebGUI::Storage->get($self->session,$self->storageId);