Skip to content

fix: No null reminders field.

Fox Piacenti requested to merge fox/listaflow-none-reminders-fix into master

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

  1. On current master:
    1. Create a Run with no reminder fields but a due date coming up, and where the recurrence is set.
    2. Run the send_reminder_emails task and observe the traceback
  2. Switch to this branch
  3. Run migrations
  4. 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.

Merge request reports