fix: No null reminders field.
This Merge request fixes an issue where Runs with a null reminders field on a run would break the email reminders task. It also does a bit of boyscouting while doing so, adding some additional type annotations and improving comments, for instance.
Supporting information
- Jira ticket: url
Discussions
Link to any public discussions about this PR or the design/architecture. Otherwise omit this.
Testing instructions
Step by step procedure
- On current master:
- Create a Run with no reminder fields but a due date coming up, and where the recurrence is set.
- Run the send_reminder_emails task and observe the traceback
- Switch to this branch
- Run migrations
- Run send_reminder_emails task and see no traceback (and no email)
Author notes and concerns
There doesn't seem to be a good way to add a test for this because the change includes making it impossible for a Run with a null reminder field to arise, which is what triggers this error. I've elected to do some small code cleanup/improvements instead.