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

@ -4,6 +4,7 @@
- fixed #11952: Navigation template help error
- fixed #11951: Privacy setting of new profile field
- fixed #11947: PayPal does not register in-state sales taxes
- fixed #11956: ExtendCalenderRecurrence bug
7.10.4
- Added WebGUI::Fork api

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');

View file

@ -97,7 +97,7 @@ my $sql = q{
my $dates = $session->db->buildArrayRefOfHashRefs($sql, [$calendar->getId]);
# 3 years at every other month (6 times) plus the one we started with
is(@$dates, 19) or diag Dumper $dates;
is(@$dates, 19, 'created right number of dates') or diag Dumper $dates;
done_testing;