notify_delegate_of_wca_id_claim assumes that delegate_to_handle_wca_id_claim exists #943
Labels
META: good first issue
Small/easy change which is a good introduction to working in the WCA repo
TYPE: bug
Bug reported by a stakeholder
This assumption was true in a world where we synchronously sent emails, but now that we do them in a background job, there's a window of time where the delegate could approve a WCA ID request (thereby clearing
delegate_to_handle_wca_id_claim
) before we actually run the job (this has happened to us a few times because our background jobs have stuff running, and then when we get them running again, we find that some delegates processed the WCA ID claims in the interim.I think the only thing we can do here is to have
notify_delegate_of_wca_id_claim
bail out ifdelegate_to_handle_wca_id_claim
is not defined. This should be an easy change.We should definitely test this by hand, as I have a vague suspicion that Rails might do something weird when you decide not to send an email in a
ApplicationMailer
method (see this code).The text was updated successfully, but these errors were encountered: