Handle assets that can't be instanciated in ExtendCalendarRecurrences. Fixes bug #11956.

This commit is contained in:
Colin Kuskie 2010-11-10 08:46:08 -08:00
parent 0acdcbc52b
commit ce7a7394b5
3 changed files with 6 additions and 1 deletions

View file

@ -165,6 +165,10 @@ sub processRecurrence {
my ( $self, $recurId, $timeLimit ) = @_;
my $eventId = $self->findLastEventId($recurId);
my $event = WebGUI::Asset::Event->new( $self->session, $eventId );
if (! $event) {
$self->session->log->warn("Unable to instanciate event with assetId $eventId");
return 0;
}
my $recur = $event->getRecurrence;
my $start = $event->getDateTimeStart->truncate(to => 'day');