Removing error when already sent email

This commit is contained in:
Finley Ghosh 2025-09-17 21:23:35 +10:00
parent eecb120a93
commit f9c562a85d
2 changed files with 3 additions and 1 deletions

View file

@ -386,8 +386,10 @@ func (h *QuotesHandler) SendQuoteReminderEmail(ctx context.Context, quoteID int3
if err != nil {
return fmt.Errorf("failed to check existing reminders: %w", err)
}
// Exit if the email has already been sent
if len(reminders) > 0 {
return fmt.Errorf("reminder of type %s already sent for quote %d", reminderType.String(), quoteID)
return nil
}
// Send the email

Binary file not shown.