Skip to content

Commit c7c7633

Browse files
makcimerrrclaude
andcommitted
fix(cron): notify-audit-groups 500 — Date brute en param SQL
getOverdueGroups interpolait un objet Date dans un template sql`` brut (${fourteenDaysAgo}) -> postgres-js: TypeError ERR_INVALID_ARG_TYPE (Received an instance of Date) -> le cron des relances plantait (500), donc aucune relance Teams/Discord. Fix: passer fourteenDaysAgo.toISOString(). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent afca506 commit c7c7633

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/db/services/groupStatuses.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export async function getOverdueGroups(): Promise<(typeof groupStatuses.$inferSe
130130
isNotNull(groupStatuses.notifiedAuditAt),
131131
isNull(groupStatuses.slotDate),
132132
isNull(groupStatuses.reminderSentAt),
133-
sql`${groupStatuses.notifiedAuditAt} <= ${fourteenDaysAgo}`
133+
sql`${groupStatuses.notifiedAuditAt} <= ${fourteenDaysAgo.toISOString()}`
134134
)
135135
);
136136
}

0 commit comments

Comments
 (0)