From de2f7451f7ed998118cd17974aa07770b91970e1 Mon Sep 17 00:00:00 2001 From: Erik Huelsmann Date: Thu, 2 Jan 2025 11:26:03 +0100 Subject: [PATCH] Fix persisting e-mail workflows without attachments --- lib/LedgerSMB/Workflow/Persister/Email.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/LedgerSMB/Workflow/Persister/Email.pm b/lib/LedgerSMB/Workflow/Persister/Email.pm index 95758ff9d6..8db7ec2f20 100644 --- a/lib/LedgerSMB/Workflow/Persister/Email.pm +++ b/lib/LedgerSMB/Workflow/Persister/Email.pm @@ -123,7 +123,7 @@ sub _save_email_data { $wf->id, $data->@{qw(from to cc bcc notify subject body expansions)}) or $log->error($dbh->errstr); } - for my $att ($ctx->param( '_attachments' )->@*) { + for my $att ( ($ctx->param( '_attachments' ) // [])->@* ) { if (my $c = tied $att->{content}) { $c->persist; next;