Skip to content

Commit

Permalink
Must set cache after updating, since the attribute clears the cache i…
Browse files Browse the repository at this point in the history
…f the ids are different.
  • Loading branch information
perlDreamer committed Apr 7, 2010
1 parent c549803 commit ce39ad6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/WebGUI/Asset/Wobject/Article.pm
Expand Up @@ -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);
Expand Down

0 comments on commit ce39ad6

Please sign in to comment.