Improve robustness.

This commit is contained in:
Martin Kamerbeek 2010-06-18 11:48:48 +02:00
parent 192cd6afe4
commit 87163f5d0f
3 changed files with 27 additions and 3 deletions

View file

@ -151,6 +151,11 @@ sub send {
#### TODO: Error checking
my $mailing = $self->getMailing;
unless ( $mailing ) {
$session->log->error( 'Cannot send because getMailing doesn\'t return one.' );
return;
}
my $configuration = $mailing->get('configuration') || {};
my $asset = $mailing->getAsset;
my $content = $asset->processContentAsUser( $mailing->get('issueId'), $self->get('userId'), $configuration );