Disabled autoRefresh when adding an email recipient failure

- we don't need the updated model once we've saved it in the DB, so we
  can disable the auto refresh in Bookshelf to save a query
This commit is contained in:
Daniel Lockyer 2023-02-27 15:30:03 +01:00 committed by Daniel Lockyer
parent 31bc57fbe1
commit 42768937fd

View File

@ -86,7 +86,7 @@ class EmailEventStorage {
enhanced_code: event.error.enhancedCode, enhanced_code: event.error.enhancedCode,
failed_at: event.timestamp, failed_at: event.timestamp,
event_id: event.id event_id: event.id
}, options); }, {...options, autoRefresh: false});
} else { } else {
if (existing.get('severity') === 'permanent') { if (existing.get('severity') === 'permanent') {
// Already marked as failed, no need to change anything here // Already marked as failed, no need to change anything here