mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-04-12 05:10:45 -04:00
How this happens: a user starts to send a letter job, then in another tab starts a SMS or email job, the sender_id is set in the session. Then the user goes back to the letter job tab and creates the job. The sender_id is set in the metadata of the csv file, and causes an exception when trying to persist the letter notification. This PR adds a check to ensure the sender_id is not set for letter jobs. This will catch a small use case where the user has multiple tabs open and has started sending an SMS or email job, then tries to send a letter job.