fix tests

This commit is contained in:
root
2026-06-11 11:46:12 -04:00
parent c91fa2ce4d
commit 5ead80fdc7
1489 changed files with 11349 additions and 10305 deletions
@@ -17,6 +17,7 @@ class CommunicationTemplateService
->get()
->map(function ($row) use ($keyColumn, $bodyColumn) {
$row = (array) $row;
return [
'template_key' => (string) ($row[$keyColumn] ?? ''),
'subject' => (string) ($row['subject'] ?? ''),
@@ -35,7 +36,7 @@ class CommunicationTemplateService
->where('is_active', 1)
->first();
if (!$row) {
if (! $row) {
return null;
}
@@ -52,6 +53,7 @@ class CommunicationTemplateService
{
$keyColumn = Schema::hasColumn('email_templates', 'template_key') ? 'template_key' : 'code';
$bodyColumn = Schema::hasColumn('email_templates', 'body') ? 'body' : 'body_html';
return [$keyColumn, $bodyColumn];
}
}