Handle assets that can't be instanciated in ExtendCalendarRecurrences. Fixes bug #11956.
This commit is contained in:
parent
0acdcbc52b
commit
ce7a7394b5
3 changed files with 6 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue