Handle the case when purging a story, and there's no storage location.
This commit is contained in:
parent
e5c56dcf70
commit
2f0b2638cf
2 changed files with 74 additions and 4 deletions
|
|
@ -262,7 +262,8 @@ Cleaning up storage objects in all revisions.
|
|||
sub purge {
|
||||
my $self = shift;
|
||||
my $sth = $self->session->db->read("select storageId from Story where assetId=".$self->session->db->quote($self->getId));
|
||||
while (my ($storageId) = $sth->array) {
|
||||
STORAGE: while (my ($storageId) = $sth->array) {
|
||||
next STORAGE unless $storageId;
|
||||
WebGUI::Storage->get($self->session,$storageId)->delete;
|
||||
}
|
||||
$sth->finish;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue